mirror of
https://github.com/torvalds/linux.git
synced 2026-05-26 16:12:59 +02: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:
parent
b2e9821cff
commit
4792c3a4c1
|
|
@ -4194,7 +4194,7 @@ static inline int __dev_xmit_skb(struct sk_buff *skb, struct Qdisc *q,
|
|||
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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user