Skip to content

Commit 0f5f222

Browse files
edumazetopsiff
authored andcommitted
net: annotate a data-race in __dev_xmit_skb()
mainline inclusion from mainline-v6.19-rc1 category: bugfix q->limit is read locklessly, add a READ_ONCE(). Fixes: 100dfa7 ("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> (cherry picked from commit 4792c3a) Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
1 parent ef13a77 commit 0f5f222

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

net/core/dev.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4208,7 +4208,7 @@ static inline int __dev_xmit_skb(struct sk_buff *skb, struct Qdisc *q,
42084208
do {
42094209
if (first_n && !defer_count) {
42104210
defer_count = atomic_long_inc_return(&q->defer_count);
4211-
if (unlikely(defer_count > q->limit)) {
4211+
if (unlikely(defer_count > READ_ONCE(q->limit))) {
42124212
kfree_skb_reason(skb, SKB_DROP_REASON_QDISC_DROP);
42134213
return NET_XMIT_DROP;
42144214
}

0 commit comments

Comments
 (0)