]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
mptcp: fix data race around msk->first access
authorPaolo Abeni <pabeni@redhat.com>
Wed, 31 May 2023 19:37:06 +0000 (12:37 -0700)
committerJakub Kicinski <kuba@kernel.org>
Thu, 1 Jun 2023 17:04:04 +0000 (10:04 -0700)
commit1b1b43ee7a208096ecd79e626f2fc90d4a321111
tree7b2091a9c5a99a661b48683a4833c13ab452cc99
parent7e8b88ec35eef363040e08d99536d2bebef83774
mptcp: fix data race around msk->first access

The first subflow socket is accessed outside the msk socket lock
by mptcp_subflow_fail(), we need to annotate each write access
with WRITE_ONCE, but a few spots still lacks it.

Fixes: 76a13b315709 ("mptcp: invoke MP_FAIL response when needed")
Reviewed-by: Mat Martineau <martineau@kernel.org>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Mat Martineau <martineau@kernel.org>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/mptcp/protocol.c