mptcp: add annotations around msk->subflow accesses
authorPaolo Abeni <pabeni@redhat.com>
Wed, 31 May 2023 19:37:04 +0000 (12:37 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 9 Jun 2023 08:34:05 +0000 (10:34 +0200)
commit1b9e3ab669a376d226dbd31ef7be7da81a710754
treeff16fe2e865b5f51a3eb8eb77884e4ec65e33984
parentc5ebb5cec9fb9528c72ece3140a377bd22e19ccf
mptcp: add annotations around msk->subflow accesses

[ 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>
net/mptcp/protocol.c
net/mptcp/protocol.h