diff mbox series

[v2,1/4] libertas_tf: don't call kfree_skb() under spin_lock_irqsave()

Message ID 20221207150008.111743-2-yangyingliang@huawei.com
State New
Headers show
Series libertas/libertas_tf: don't call kfree_skb() under spin_lock_irqsave() | expand

Commit Message

Yang Yingliang Dec. 7, 2022, 3 p.m. UTC
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>
---
 drivers/net/wireless/marvell/libertas_tf/if_usb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Kalle Valo Dec. 22, 2022, 4:13 p.m. UTC | #1
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: fc75122fabb5 ("libertas_tf: use irqsave() in USB's complete callback")
> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>

4 patches applied to wireless-next.git, thanks.

9388ce97b982 wifi: libertas_tf: don't call kfree_skb() under spin_lock_irqsave()
3968e81ba644 wifi: libertas: if_usb: don't call kfree_skb() under spin_lock_irqsave()
f393df151540 wifi: libertas: main: don't call kfree_skb() under spin_lock_irqsave()
708a49a64237 wifi: libertas: cmdresp: don't call kfree_skb() under spin_lock_irqsave()
Info Skymem April 6, 2023, 3:01 p.m. UTC | #2
Dear Kalle Valo, Yang Yingliang, and Libertas-dev team,

Thank you for your hard work on the recent patches. I'd like to
introduce you to our website, https://www.skymem.info, an email
finding tool that can help you expand your network and connect with
potential collaborators. You can use it like Google for emails.

Here are the advantages of using Skymem for your networking needs:
1. Endless search of emails and domains.
2. Creation of an email list using an advanced filter.
3. Price per email over 10 times lower than that of competitors.

We believe Skymem could be a valuable resource for you in building
connections within the wireless and kernel development communities.

Best regards,

Robert
Skymem Team
https://www.skymem.info

On Thu, Dec 22, 2022 at 5:28 PM Kalle Valo <kvalo@kernel.org> wrote:
>
> 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: fc75122fabb5 ("libertas_tf: use irqsave() in USB's complete callback")
> > Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
>
> 4 patches applied to wireless-next.git, thanks.
>
> 9388ce97b982 wifi: libertas_tf: don't call kfree_skb() under spin_lock_irqsave()
> 3968e81ba644 wifi: libertas: if_usb: don't call kfree_skb() under spin_lock_irqsave()
> f393df151540 wifi: libertas: main: don't call kfree_skb() under spin_lock_irqsave()
> 708a49a64237 wifi: libertas: cmdresp: don't call kfree_skb() under spin_lock_irqsave()
>
> --
> https://patchwork.kernel.org/project/linux-wireless/patch/20221207150008.111743-2-yangyingliang@huawei.com/
>
> https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
>
>
> _______________________________________________
> libertas-dev mailing list
> libertas-dev@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/libertas-dev
diff mbox series

Patch

diff --git a/drivers/net/wireless/marvell/libertas_tf/if_usb.c b/drivers/net/wireless/marvell/libertas_tf/if_usb.c
index 75b5319d033f..1750f5e93de2 100644
--- a/drivers/net/wireless/marvell/libertas_tf/if_usb.c
+++ b/drivers/net/wireless/marvell/libertas_tf/if_usb.c
@@ -613,7 +613,7 @@  static inline void process_cmdrequest(int recvlength, uint8_t *recvbuff,
 	spin_lock_irqsave(&priv->driver_lock, flags);
 	memcpy(priv->cmd_resp_buff, recvbuff + MESSAGE_HEADER_LEN,
 	       recvlength - MESSAGE_HEADER_LEN);
-	kfree_skb(skb);
+	dev_kfree_skb_irq(skb);
 	lbtf_cmd_response_rx(priv);
 	spin_unlock_irqrestore(&priv->driver_lock, flags);
 }