]> 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>
Wed, 17 May 2023 09:35:41 +0000 (11:35 +0200)
commitfa9fd8b34c052f357871a67e451df6cadd01c3d5
treed381113a6e73106d2194b599f432650201db4bd5
parent8bd475aacc47e41332ee77d257b7a53de6a86468
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