net/packet: annotate data race in packet_sendmsg()
authorEric Dumazet <edumazet@google.com>
Thu, 10 Jun 2021 16:00:12 +0000 (09:00 -0700)
committerSasha Levin <sashal@kernel.org>
Wed, 30 Jun 2021 12:47:21 +0000 (08:47 -0400)
commitf57132a887ea4be3d7d813b5003d56716ba33448
tree3a60d26b25f416c0e10ba160edfa7d5b4ca62af7
parent9707960ecfdc27d1d57c83ab47472f79f3a4c3f8
net/packet: annotate data race in packet_sendmsg()

[ Upstream commit d1b5bee4c8be01585033be9b3a8878789285285f ]

There is a known race in packet_sendmsg(), addressed
in commit 32d3182cd2cd ("net/packet: fix race in tpacket_snd()")

Now we have data_race(), we can use it to avoid a future KCSAN warning,
as syzbot loves stressing af_packet sockets :)

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/packet/af_packet.c