aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Dragomir <Daniel.Dragomir@windriver.com>2020-11-16 21:11:53 +0200
committerBruce Ashfield <bruce.ashfield@gmail.com>2020-11-19 10:13:54 -0500
commit978035cc9ec3395fa8f34daa17ebd1e48bb5a13a (patch)
treed94e29321bcb5e990402e46e5e9331938031153b
parentcb1f7b18369783e83ecba9f7c6c6708104461527 (diff)
downloadlinux-yocto-v4.19/standard/preempt-rt/base.tar.gz
linux-yocto-v4.19/standard/preempt-rt/base.tar.bz2
linux-yocto-v4.19/standard/preempt-rt/base.zip
net: core: Fix dead loop on virtual device lov4.19/standard/preempt-rt/base
Multiple alarming messages are shown on running tcp bandwidth test from lmbench suite and the test fails with timeout: Dead loop on virtual device lo, fix it urgently! The cause for this failure is commit edbe65322391 ("net: place xmit recursion in softnet data") which overwrites some preempt-rt specific changes (PREEMPT_RT_FULL) from commit 7963359759cb ("net: move xmit_recursion to per-task variable on -RT "). The original version for commit edbe65322391 from kernel.org: https://lkml.org/lkml/2020/6/29/1000 Signed-off-by: Daniel Dragomir <Daniel.Dragomir@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
-rw-r--r--net/core/dev.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index 6f7e36ef026b..17343961fa24 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -3834,7 +3834,11 @@ static int __dev_queue_xmit(struct sk_buff *skb, struct net_device *sb_dev)
if (dev->flags & IFF_UP) {
int cpu = smp_processor_id(); /* ok because BHs are off */
+#ifdef CONFIG_PREEMPT_RT_FULL
+ if (txq->xmit_lock_owner != current) {
+#else
if (txq->xmit_lock_owner != cpu) {
+#endif
if (dev_xmit_recursion())
goto recursion_alert;