Skip to content

Commit 2519040

Browse files
Yang YingliangSasha Levin
authored andcommitted
wifi: libertas: if_usb: don't call kfree_skb() under spin_lock_irqsave()
[ Upstream commit 3968e81 ] 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: a3128fe ("libertas: 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-3-yangyingliang@huawei.com Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 8f38006 commit 2519040

File tree

1 file changed

+1
-1
lines changed
  • drivers/net/wireless/marvell/libertas

1 file changed

+1
-1
lines changed

drivers/net/wireless/marvell/libertas/if_usb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -637,7 +637,7 @@ static inline void process_cmdrequest(int recvlength, uint8_t *recvbuff,
637637
priv->resp_len[i] = (recvlength - MESSAGE_HEADER_LEN);
638638
memcpy(priv->resp_buf[i], recvbuff + MESSAGE_HEADER_LEN,
639639
priv->resp_len[i]);
640-
kfree_skb(skb);
640+
dev_kfree_skb_irq(skb);
641641
lbs_notify_command_response(priv, i);
642642

643643
spin_unlock_irqrestore(&priv->driver_lock, flags);

0 commit comments

Comments
 (0)