summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net/core/dev.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index 4420086f3aeb..53bef2aae378 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -3719,8 +3719,12 @@ no_lock_out:
* 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);