mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-22 20:23:57 +08:00
mptcp: Safely read sequence number when lock isn't held
The MPTCP socket's write_seq member should be read with READ_ONCE() when the msk lock is not held. Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
06827b348b
commit
c75293925f
@ -1269,7 +1269,7 @@ static void mptcp_retransmit_handler(struct sock *sk)
|
||||
{
|
||||
struct mptcp_sock *msk = mptcp_sk(sk);
|
||||
|
||||
if (atomic64_read(&msk->snd_una) == msk->write_seq) {
|
||||
if (atomic64_read(&msk->snd_una) == READ_ONCE(msk->write_seq)) {
|
||||
mptcp_stop_timer(sk);
|
||||
} else {
|
||||
set_bit(MPTCP_WORK_RTX, &msk->flags);
|
||||
|
Loading…
Reference in New Issue
Block a user