diff options
Diffstat (limited to 'debian/patches-rt/net_core__use_local_bh_disable_in_netif_rx_ni.patch')
-rw-r--r-- | debian/patches-rt/net_core__use_local_bh_disable_in_netif_rx_ni.patch | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/debian/patches-rt/net_core__use_local_bh_disable_in_netif_rx_ni.patch b/debian/patches-rt/net_core__use_local_bh_disable_in_netif_rx_ni.patch new file mode 100644 index 000000000..be25e87ce --- /dev/null +++ b/debian/patches-rt/net_core__use_local_bh_disable_in_netif_rx_ni.patch @@ -0,0 +1,40 @@ +Subject: net/core: use local_bh_disable() in netif_rx_ni() +From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> +Date: Fri Jun 16 19:03:16 2017 +0200 +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz + +From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> + +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> +Signed-off-by: Thomas Gleixner <tglx@linutronix.de> + + +--- + net/core/dev.c | 6 ++---- + 1 file changed, 2 insertions(+), 4 deletions(-) +--- +--- a/net/core/dev.c ++++ b/net/core/dev.c +@@ -4943,11 +4943,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(); + trace_netif_rx_ni_exit(err); + + return err; |