summaryrefslogtreecommitdiffstats
path: root/drivers/net/usb/pegasus.h
diff options
context:
space:
mode:
authorDongdong Deng2009-08-13 21:12:31 +0200
committerDavid S. Miller2009-08-15 01:41:16 +0200
commit22580f894ac190c46beebb5c3172e450a2318f79 (patch)
tree01f88df9a5bc27170ef7ca944ba40af578476d72 /drivers/net/usb/pegasus.h
parentvia-velocity: Fix test of mii_status bit VELOCITY_DUPLEX_FULL (diff)
downloadkernel-qcow2-linux-22580f894ac190c46beebb5c3172e450a2318f79.tar.gz
kernel-qcow2-linux-22580f894ac190c46beebb5c3172e450a2318f79.tar.xz
kernel-qcow2-linux-22580f894ac190c46beebb5c3172e450a2318f79.zip
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 spin_lock_irq() and spin_unlock_irq() in the NETPOLL API callbacks causes the interrupts to get enabled and can lead to kernel instability. The solution is to use spin_lock_irqsave() and spin_unlock_restore() to prevent the irqs from getting enabled while in netpoll_send_skb(). Call trace: netpoll_send_skb() { -> local_irq_save(flags) ---> dev->ndo_start_xmit(skb, dev) ---> spin_lock_irq() ---> spin_unlock_irq() *******here would enable the interrupt. ... -> local_irq_restore(flags) } Signed-off-by: Dongdong Deng <dongdong.deng@windriver.com> Signed-off-by: Jason Wessel <jason.wessel@windriver.com> Acked-by: Bruce Ashfield <bruce.ashfield@windriver.com> Acked-by: Matt Mackall <mpm@selenic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/usb/pegasus.h')
0 files changed, 0 insertions, 0 deletions