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:
committed by
Jeff Garzik
parent
79f3d3996f
commit
d15e9c4d9a
@@ -617,13 +617,15 @@ rx_next:
|
||||
* this round of polling
|
||||
*/
|
||||
if (rx_work) {
|
||||
unsigned long flags;
|
||||
|
||||
if (cpr16(IntrStatus) & cp_rx_intr_mask)
|
||||
goto rx_status_loop;
|
||||
|
||||
local_irq_disable();
|
||||
local_irq_save(flags);
|
||||
cpw16_f(IntrMask, cp_intr_mask);
|
||||
__netif_rx_complete(dev);
|
||||
local_irq_enable();
|
||||
local_irq_restore(flags);
|
||||
|
||||
return 0; /* done */
|
||||
}
|
||||
|
Reference in New Issue
Block a user