• Yang Yingliang's avatar
    hamradio: don't call dev_kfree_skb() under spin_lock_irqsave() · 3727f742
    Yang Yingliang authored
    It is not allowed to call kfree_skb() or consume_skb() from hardware
    interrupt context or with hardware interrupts being disabled.
    
    It should use dev_kfree_skb_irq() or dev_consume_skb_irq() instead.
    The difference between them is free reason, dev_kfree_skb_irq() means
    the SKB is dropped in error and dev_consume_skb_irq() means the SKB
    is consumed in normal.
    
    In scc_discard_buffers(), dev_kfree_skb() is called to discard the SKBs,
    so replace it with dev_kfree_skb_irq().
    
    In scc_net_tx(), dev_kfree_skb() is called to drop the SKB that exceed
    queue length, so replace it with dev_kfree_skb_irq().
    
    Fixes: 1da177e4 ("Linux-2.6.12-rc2")
    Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    3727f742
scc.c 53.9 KB