aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/net/core/dev.c
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2025-11-21 08:32:53 +0000
committerPaolo Abeni <pabeni@redhat.com>2025-11-25 16:10:32 +0100
commit4792c3a4c1470202b0d5bf44b6058cb0fb050ba8 (patch)
tree1263d5636e22aa6398da1c358ef9b4625ade973a /net/core/dev.c
parentnet: prefech skb->priority in __dev_xmit_skb() (diff)
downloadwireguard-linux-4792c3a4c1470202b0d5bf44b6058cb0fb050ba8.tar.xz
wireguard-linux-4792c3a4c1470202b0d5bf44b6058cb0fb050ba8.zip
net: annotate a data-race in __dev_xmit_skb()
q->limit is read locklessly, add a READ_ONCE(). Fixes: 100dfa74cad9 ("net: dev_queue_xmit() llist adoption") Signed-off-by: Eric Dumazet <edumazet@google.com> Link: https://patch.msgid.link/20251121083256.674562-12-edumazet@google.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to '')
-rw-r--r--net/core/dev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index 53e2496dc429..10042139dbb0 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -4194,7 +4194,7 @@ no_lock_out:
do {
if (first_n && !defer_count) {
defer_count = atomic_long_inc_return(&q->defer_count);
- if (unlikely(defer_count > q->limit)) {
+ if (unlikely(defer_count > READ_ONCE(q->limit))) {
kfree_skb_reason(skb, SKB_DROP_REASON_QDISC_DROP);
return NET_XMIT_DROP;
}