mptcp: annotate data-races around msk->rmem_fwd_alloc
authorEric Dumazet <edumazet@google.com>
Thu, 31 Aug 2023 13:52:10 +0000 (13:52 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 19 Sep 2023 10:28:01 +0000 (12:28 +0200)
commitb7d25ac3627a0ed3569cc5cb15305e172ca58385
tree7472cbe84e3dcc6d39111ab36cd308433fee67ad
parent787c5829681b14903ae507853994860caed00718
mptcp: annotate data-races around msk->rmem_fwd_alloc

[ Upstream commit 9531e4a83febc3fb47ac77e24cfb5ea97e50034d ]

msk->rmem_fwd_alloc can be read locklessly.

Add mptcp_rmem_fwd_alloc_add(), similar to sk_forward_alloc_add(),
and appropriate READ_ONCE()/WRITE_ONCE() annotations.

Fixes: 6511882cdd82 ("mptcp: allocate fwd memory separately on the rx and tx path")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/mptcp/protocol.c