Patch "wifi: libertas: cmdresp: don't call kfree_skb() under spin_lock_irqsave()" has been added to the 5.4-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    wifi: libertas: cmdresp: don't call kfree_skb() under spin_lock_irqsave()

to the 5.4-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     wifi-libertas-cmdresp-don-t-call-kfree_skb-under-spi.patch
and it can be found in the queue-5.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 9cd5a240446aca20d52e9719e5d819ecc7aa0264
Author: Yang Yingliang <yangyingliang@xxxxxxxxxx>
Date:   Wed Dec 7 23:00:08 2022 +0800

    wifi: libertas: cmdresp: don't call kfree_skb() under spin_lock_irqsave()
    
    [ Upstream commit 708a49a64237f19bd404852f297aaadbc9e7fee0 ]
    
    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: f52b041aed77 ("libertas: Add spinlock to avoid race condition")
    Signed-off-by: Yang Yingliang <yangyingliang@xxxxxxxxxx>
    Signed-off-by: Kalle Valo <kvalo@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20221207150008.111743-5-yangyingliang@xxxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/wireless/marvell/libertas/cmdresp.c b/drivers/net/wireless/marvell/libertas/cmdresp.c
index b73d083813985..5908f07d62ed7 100644
--- a/drivers/net/wireless/marvell/libertas/cmdresp.c
+++ b/drivers/net/wireless/marvell/libertas/cmdresp.c
@@ -48,7 +48,7 @@ void lbs_mac_event_disconnected(struct lbs_private *priv,
 
 	/* Free Tx and Rx packets */
 	spin_lock_irqsave(&priv->driver_lock, flags);
-	kfree_skb(priv->currenttxskb);
+	dev_kfree_skb_irq(priv->currenttxskb);
 	priv->currenttxskb = NULL;
 	priv->tx_pending_len = 0;
 	spin_unlock_irqrestore(&priv->driver_lock, flags);



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux