mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-09 07:23:14 +00:00
mptcp: Safely store sequence number when sending data
The MPTCP socket's write_seq member can be read without the msk lock held, so use WRITE_ONCE() to store it. 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
c75293925f
commit
721e908990
@ -793,7 +793,7 @@ static int mptcp_sendmsg_frag(struct sock *sk, struct sock *ssk,
|
||||
out:
|
||||
if (!retransmission)
|
||||
pfrag->offset += frag_truesize;
|
||||
*write_seq += ret;
|
||||
WRITE_ONCE(*write_seq, *write_seq + ret);
|
||||
mptcp_subflow_ctx(ssk)->rel_write_seq += ret;
|
||||
|
||||
return ret;
|
||||
|
Loading…
Reference in New Issue
Block a user