Message ID | 20221207150453.114742-1-yangyingliang@huawei.com |
---|---|
State | New |
Headers | show |
Series | [v2] wl3501_cs: don't call kfree_skb() under spin_lock_irqsave() | expand |
Yang Yingliang <yangyingliang@huawei.com> wrote: > It is not allowed to call kfree_skb() from hardware interrupt > context or with interrupts being disabled. So replace kfree_skb() > with dev_kfree_skb_irq() under spin_lock_irqsave(). Compile > tested only. > > Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") > Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Patch applied to wireless-next.git, thanks. 44bacbdf9066 wifi: wl3501_cs: don't call kfree_skb() under spin_lock_irqsave()
diff --git a/drivers/net/wireless/wl3501_cs.c b/drivers/net/wireless/wl3501_cs.c index 1b532e00a56f..7fb2f9513476 100644 --- a/drivers/net/wireless/wl3501_cs.c +++ b/drivers/net/wireless/wl3501_cs.c @@ -1328,7 +1328,7 @@ static netdev_tx_t wl3501_hard_start_xmit(struct sk_buff *skb, } else { ++dev->stats.tx_packets; dev->stats.tx_bytes += skb->len; - kfree_skb(skb); + dev_kfree_skb_irq(skb); if (this->tx_buffer_cnt < 2) netif_stop_queue(dev);
It is not allowed to call kfree_skb() from hardware interrupt context or with interrupts being disabled. So replace kfree_skb() with dev_kfree_skb_irq() under spin_lock_irqsave(). Compile tested only. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> --- v1 -> v2: Update commit message and add a fix tag. --- drivers/net/wireless/wl3501_cs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)