]> git.baikalelectronics.ru Git - kernel.git/commit
net/packet: annotate accesses to po->xmit
authorEric Dumazet <edumazet@google.com>
Thu, 16 Mar 2023 01:10:06 +0000 (01:10 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 11 May 2023 14:03:18 +0000 (23:03 +0900)
commita3b1a8e4a17f93669b1fb971ab9eb425ac277e5b
treefd64ae085af9473a587f45a14095b0d7f270b09e
parentcf025c93b4eab1af14d5fd0cfb033f0800ecdd66
net/packet: annotate accesses to po->xmit

[ Upstream commit b9d83ab8a708f23a4001d60e9d8d0b3be3d9f607 ]

po->xmit can be set from setsockopt(PACKET_QDISC_BYPASS),
while read locklessly.

Use READ_ONCE()/WRITE_ONCE() to avoid potential load/store
tearing issues.

Fixes: da6f47518774 ("packet: introduce PACKET_QDISC_BYPASS socket option")
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