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:
|
out:
|
||||||
if (!retransmission)
|
if (!retransmission)
|
||||||
pfrag->offset += frag_truesize;
|
pfrag->offset += frag_truesize;
|
||||||
*write_seq += ret;
|
WRITE_ONCE(*write_seq, *write_seq + ret);
|
||||||
mptcp_subflow_ctx(ssk)->rel_write_seq += ret;
|
mptcp_subflow_ctx(ssk)->rel_write_seq += ret;
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user