diff options
author | Mat Martineau <mathew.j.martineau@linux.intel.com> | 2020-09-29 15:08:19 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-09-29 18:15:40 -0700 |
commit | 917944da3bfc7cb5ac3af26725af3371d3a12db0 (patch) | |
tree | 69cfbea684b26dc300b756eae0366cc4183de22c /net/mptcp/options.c | |
parent | 4972c6ccf9a5f25bd0c877683cea5c1dc16669be (diff) | |
download | linux-917944da3bfc7cb5ac3af26725af3371d3a12db0.tar.bz2 |
mptcp: Consistently use READ_ONCE/WRITE_ONCE with msk->ack_seq
The msk->ack_seq value is sometimes read without the msk lock held, so
make proper use of READ_ONCE and WRITE_ONCE.
Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/mptcp/options.c')
-rw-r--r-- | net/mptcp/options.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/mptcp/options.c b/net/mptcp/options.c index 7fa822b55c34..120ef39fe589 100644 --- a/net/mptcp/options.c +++ b/net/mptcp/options.c @@ -518,11 +518,11 @@ static bool mptcp_established_options_dss(struct sock *sk, struct sk_buff *skb, if (subflow->use_64bit_ack) { ack_size = TCPOLEN_MPTCP_DSS_ACK64; - opts->ext_copy.data_ack = msk->ack_seq; + opts->ext_copy.data_ack = READ_ONCE(msk->ack_seq); opts->ext_copy.ack64 = 1; } else { ack_size = TCPOLEN_MPTCP_DSS_ACK32; - opts->ext_copy.data_ack32 = (uint32_t)(msk->ack_seq); + opts->ext_copy.data_ack32 = (uint32_t)READ_ONCE(msk->ack_seq); opts->ext_copy.ack64 = 0; } opts->ext_copy.use_ack = 1; |