diff --git a/net/core/dev.c b/net/core/dev.c index 4420086f3aeb3..53bef2aae3782 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -3719,8 +3719,12 @@ static inline int __dev_xmit_skb(struct sk_buff *skb, struct Qdisc *q, * separate lock before trying to get qdisc main lock. * This permits qdisc->running owner to get the lock more * often and dequeue packets faster. + * On PREEMPT_RT it is possible to preempt the qdisc owner during xmit + * and then other tasks will only enqueue packets. The packets will be + * sent after the qdisc owner is scheduled again. To prevent this + * scenario the task always serialize on the lock. */ - contended = qdisc_is_running(q); + contended = IS_ENABLED(CONFIG_PREEMPT_RT) || qdisc_is_running(q); if (unlikely(contended)) spin_lock(&q->busylock);