netlink: annotate data races around dst_portid and dst_group
authorEric Dumazet <edumazet@google.com>
Fri, 20 Jan 2023 12:59:54 +0000 (12:59 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 1 Feb 2023 07:27:27 +0000 (08:27 +0100)
commitc4eb423c6b9bded9aae6aeb19960bff67cb464ff
treece481b5513a89d7cd7315bbfc63cc47eb97055bd
parentfac9b69a9370ec0033e8c1f2e28bf449bcb41f33
netlink: annotate data races around dst_portid and dst_group

[ Upstream commit 004db64d185a5f23dfb891d7701e23713b2420ee ]

netlink_getname(), netlink_sendmsg() and netlink_getsockbyportid()
can read nlk->dst_portid and nlk->dst_group while another
thread is changing them.

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/netlink/af_netlink.c