mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2026-03-03 18:28:01 +01:00
net: annotate a data-race in __dev_xmit_skb()
q->limit is read locklessly, add a READ_ONCE().
Fixes: 100dfa74ca ("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>
This commit is contained in:
committed by
Paolo Abeni
parent
b2e9821cff
commit
4792c3a4c1
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user