linux/debian/patches-rt/0123-net-core-use-local_bh_...

38 lines
1.3 KiB
Diff
Raw Normal View History

From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: Fri, 16 Jun 2017 19:03:16 +0200
2019-11-25 00:04:39 +00:00
Subject: [PATCH 123/290] net/core: use local_bh_disable() in netif_rx_ni()
Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=ae0f813a827a24ec0fa98781902906f5cc5dbda6
In 2004 netif_rx_ni() gained a preempt_disable() section around
netif_rx() and its do_softirq() + testing for it. The do_softirq() part
is required because netif_rx() raises the softirq but does not invoke
it. The preempt_disable() is required to remain on the same CPU which added the
skb to the per-CPU list.
All this can be avoided be putting this into a local_bh_disable()ed
section. The local_bh_enable() part will invoke do_softirq() if
required.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
2019-04-08 23:49:20 +00:00
net/core/dev.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
2019-04-08 23:49:20 +00:00
diff --git a/net/core/dev.c b/net/core/dev.c
2019-11-25 00:04:39 +00:00
index 92e4d559ec93..defca5df6baa 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
2019-04-30 12:45:19 +00:00
@@ -4526,11 +4526,9 @@ int netif_rx_ni(struct sk_buff *skb)
trace_netif_rx_ni_entry(skb);
- preempt_disable();
+ local_bh_disable();
err = netif_rx_internal(skb);
- if (local_softirq_pending())
- do_softirq();
- preempt_enable();
+ local_bh_enable();
return err;
}