Subject: [PATCH 08/16] net: Use local_bh_disable in netif_rx_ni()
From: Sebastian Andrzej Siewior <[email-masked]>
To: Steven Rostedt <[email-masked]>
Cc: [email-masked], [email-masked], Carsten Emde <[email-masked]>, Thomas Gleixner <[email-masked]>, Sebastian Andrzej Siewior <[email-masked]>
Date: Wed, 13 Feb 2013 17:12:03 +0100
List-Id: <linux-rt-users.vger.kernel.org>

From: Thomas Gleixner <[email-masked]>

This code triggers the new WARN in __raise_softirq_irqsoff() though it
actually looks at the softirq pending bit and calls into the softirq
code, but that fits not well with the context related softirq model of
RT. It's correct on mainline though, but going through
local_bh_disable/enable here is not going to hurt badly.

Signed-off-by: Thomas Gleixner <[email-masked]>
Signed-off-by: Sebastian Andrzej Siewior <[email-masked]>
---
 net/core/dev.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

Index: linux-3.2.35-rt53/net/core/dev.c
===================================================================
--- linux-3.2.35-rt53.orig/net/core/dev.c
+++ linux-3.2.35-rt53/net/core/dev.c
@@ -3033,11 +3033,9 @@ int netif_rx_ni(struct sk_buff *skb)
 {
 	int err;
 
-	migrate_disable();
+	local_bh_disable();
 	err = netif_rx(skb);
-	if (local_softirq_pending())
-		thread_do_softirq();
-	migrate_enable();
+	local_bh_enable();
 
 	return err;
 }