aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/core/netpoll.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/core/netpoll.c b/net/core/netpoll.c
index 156d7fd81fec..a01abdd2d3ea 100644
--- a/net/core/netpoll.c
+++ b/net/core/netpoll.c
@@ -243,7 +243,9 @@ static void netpoll_send_skb(struct netpoll *np, struct sk_buff *skb)
243 /* don't get messages out of order, and no recursion */ 243 /* don't get messages out of order, and no recursion */
244 if (skb_queue_len(&npinfo->txq) == 0 && 244 if (skb_queue_len(&npinfo->txq) == 0 &&
245 npinfo->poll_owner != smp_processor_id()) { 245 npinfo->poll_owner != smp_processor_id()) {
246 local_bh_disable(); /* Where's netif_tx_trylock_bh()? */ 246 unsigned long flags;
247
248 local_irq_save(flags);
247 if (netif_tx_trylock(dev)) { 249 if (netif_tx_trylock(dev)) {
248 /* try until next clock tick */ 250 /* try until next clock tick */
249 for (tries = jiffies_to_usecs(1)/USEC_PER_POLL; 251 for (tries = jiffies_to_usecs(1)/USEC_PER_POLL;
@@ -261,7 +263,7 @@ static void netpoll_send_skb(struct netpoll *np, struct sk_buff *skb)
261 } 263 }
262 netif_tx_unlock(dev); 264 netif_tx_unlock(dev);
263 } 265 }
264 local_bh_enable(); 266 local_irq_restore(flags);
265 } 267 }
266 268
267 if (status != NETDEV_TX_OK) { 269 if (status != NETDEV_TX_OK) {