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.

b57bd06655 fixed the issue for the
8139too.c driver.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
This commit is contained in:
Francois Romieu
2006-12-17 23:03:15 +01:00
committed by Jeff Garzik
parent 79f3d3996f
commit d15e9c4d9a
4 changed files with 18 additions and 10 deletions

View File

@@ -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;
}