projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c752939
)
mptcp: Safely store sequence number when sending data
author
Mat Martineau
<mathew.j.martineau@linux.intel.com>
Tue, 28 Jul 2020 22:12:10 +0000
(15:12 -0700)
committer
David S. Miller
<davem@davemloft.net>
Wed, 29 Jul 2020 00:02:42 +0000
(17:02 -0700)
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>
net/mptcp/protocol.c
patch
|
blob
|
history
diff --git
a/net/mptcp/protocol.c
b/net/mptcp/protocol.c
index
f2455a6
..
687f0be
100644
(file)
--- a/
net/mptcp/protocol.c
+++ b/
net/mptcp/protocol.c
@@
-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;