android_kernel_xiaomi_sm8350/drivers/net/tulip
Dongdong Deng 22580f894a 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>
2009-08-14 16:41:16 -07:00
..
21142.c
de4x5.c tulip: Read buffer overflow 2009-08-02 12:20:38 -07:00
de4x5.h
de2104x.c Remove multiple KERN_ prefixes from printk formats 2009-07-08 10:30:03 -07:00
dmfe.c net: use symbolic values for ndo_start_xmit() return codes 2009-06-13 01:18:50 -07:00
eeprom.c
interrupt.c
Kconfig
Makefile
media.c
pnic2.c
pnic.c
timer.c
tulip_core.c drivers/net: fixed drivers that support netpoll use ndo_start_xmit() 2009-08-14 16:41:16 -07:00
tulip.h
uli526x.c net: use symbolic values for ndo_start_xmit() return codes 2009-06-13 01:18:50 -07:00
winbond-840.c Remove multiple KERN_ prefixes from printk formats 2009-07-08 10:30:03 -07:00
xircom_cb.c