Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

wifi: libertas_tf: don't call kfree_skb() under spin_lock_irqsave()

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: fc75122fabb5 ("libertas_tf: use irqsave() in USB's complete callback")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20221207150008.111743-2-yangyingliang@huawei.com

authored by

Yang Yingliang and committed by
Kalle Valo
9388ce97 b9f42003

+1 -1
+1 -1
drivers/net/wireless/marvell/libertas_tf/if_usb.c
··· 613 613 spin_lock_irqsave(&priv->driver_lock, flags); 614 614 memcpy(priv->cmd_resp_buff, recvbuff + MESSAGE_HEADER_LEN, 615 615 recvlength - MESSAGE_HEADER_LEN); 616 - kfree_skb(skb); 616 + dev_kfree_skb_irq(skb); 617 617 lbtf_cmd_response_rx(priv); 618 618 spin_unlock_irqrestore(&priv->driver_lock, flags); 619 619 }