drivers/net: fixed drivers that support netpoll use ndo_start_xmit()
authorDongdong Deng <dongdong.deng@windriver.com>
Mon, 24 Aug 2009 02:49:07 +0000 (19:49 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 24 Aug 2009 02:51:03 +0000 (19:51 -0700)
commit4871953c0ef2cafeb37bbe186d9d13dcb24fc2c5
treee272c3a7aeb61a40f3ec807e2b4c8001ed837a7b
parent79b1bee888d43b14cf0c08fb8e5aa6cb161e48f8
drivers/net: fixed drivers that support netpoll use ndo_start_xmit()

The NETPOLL API requires that interrupts remain disabled in
netpoll_send_skb(). The use of "A functions set" in the NETPOLL API
callbacks causes the interrupts to get enabled and can lead to kernel
instability.

The solution is to use "B functions set" to prevent the irqs from
getting enabled while in netpoll_send_skb().

A functions set:
local_irq_disable()/local_irq_enable()
spin_lock_irq()/spin_unlock_irq()
spin_trylock_irq()/spin_unlock_irq()

B functions set:
local_irq_save()/local_irq_restore()
spin_lock_irqsave()/spin_unlock_irqrestore()
spin_trylock_irqsave()/spin_unlock_irqrestore()

Signed-off-by: Dongdong Deng <dongdong.deng@windriver.com>
Acked-by: Matt Mackall <mpm@selenic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/fec_mpc52xx.c
drivers/net/ixp2000/ixpdev.c
drivers/net/macb.c
drivers/net/mlx4/en_tx.c