]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
mptcp: add annotations around msk->subflow accesses
authorPaolo Abeni <pabeni@redhat.com>
Wed, 31 May 2023 19:37:04 +0000 (12:37 -0700)
committerStefan Bader <stefan.bader@canonical.com>
Mon, 4 Sep 2023 09:10:24 +0000 (11:10 +0200)
commit069fbbfd7bf33b2302bb9d774c2293c33468309b
treec5a39b79d9b20d1b6d966beb468cee436526bfee
parent5d881fdca5761a087fc63556c92aada067bd5090
mptcp: add annotations around msk->subflow accesses

BugLink: https://bugs.launchpad.net/bugs/2029808
[ Upstream commit 5b825727d0871b23e8867f6371183e61628b4a26 ]

The MPTCP can access the first subflow socket in a few spots
outside the socket lock scope. That is actually safe, as MPTCP
will delete the socket itself only after the msk sock close().

Still the such accesses causes a few KCSAN splats, as reported
by Christoph. Silence the harmless warning adding a few annotation
around the relevant accesses.

Fixes: 71ba088ce0aa ("mptcp: cleanup accept and poll")
Reported-by: Christoph Paasch <cpaasch@apple.com>
Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/402
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
net/mptcp/protocol.c
net/mptcp/protocol.h