From d15e9c4d9a75702b30e00cdf95c71c88e3f3f51e Mon Sep 17 00:00:00 2001 From: Francois Romieu Date: Sun, 17 Dec 2006 23:03:15 +0100 Subject: netpoll: drivers must not enable IRQ unconditionally in their NAPI handler net/core/netpoll.c::netpoll_send_skb() calls the poll handler when it is available. As netconsole can be used from almost any context, IRQ must not be enabled blindly in the NAPI handler of a driver which supports netpoll. b57bd06655a028aba7b92e1c19c2093e7fcfb341 fixed the issue for the 8139too.c driver. Signed-off-by: Francois Romieu Signed-off-by: Jeff Garzik --- drivers/net/b44.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'drivers/net/b44.c') diff --git a/drivers/net/b44.c b/drivers/net/b44.c index 474a4e3438db..5eb2ec68393f 100644 --- a/drivers/net/b44.c +++ b/drivers/net/b44.c @@ -879,12 +879,14 @@ static int b44_poll(struct net_device *netdev, int *budget) } if (bp->istat & ISTAT_ERRORS) { - spin_lock_irq(&bp->lock); + unsigned long flags; + + spin_lock_irqsave(&bp->lock, flags); b44_halt(bp); b44_init_rings(bp); b44_init_hw(bp, 1); netif_wake_queue(bp->dev); - spin_unlock_irq(&bp->lock); + spin_unlock_irqrestore(&bp->lock, flags); done = 1; } -- cgit v1.2.3-59-g8ed1b