Patch "Bluetooth: RFCOMM: don't call kfree_skb() under spin_lock_irqsave()" has been added to the 4.19-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

    Bluetooth: RFCOMM: don't call kfree_skb() under spin_lock_irqsave()

to the 4.19-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:
     bluetooth-rfcomm-don-t-call-kfree_skb-under-spin_loc.patch
and it can be found in the queue-4.19 subdirectory.

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



commit c12a55167bcba0b03f1d1966f994cd9f869dcc11
Author: Yang Yingliang <yangyingliang@xxxxxxxxxx>
Date:   Wed Dec 7 10:18:35 2022 +0800

    Bluetooth: RFCOMM: don't call kfree_skb() under spin_lock_irqsave()
    
    [ Upstream commit 0ba18967d4544955b2eff2fbc4f2a8750c4df90a ]
    
    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().
    
    Fixes: 81be03e026dc ("Bluetooth: RFCOMM: Replace use of memcpy_from_msg with bt_skb_sendmmsg")
    Signed-off-by: Yang Yingliang <yangyingliang@xxxxxxxxxx>
    Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/net/bluetooth/rfcomm/core.c b/net/bluetooth/rfcomm/core.c
index e4eaf5d2acbd..86edf512d497 100644
--- a/net/bluetooth/rfcomm/core.c
+++ b/net/bluetooth/rfcomm/core.c
@@ -593,7 +593,7 @@ int rfcomm_dlc_send(struct rfcomm_dlc *d, struct sk_buff *skb)
 
 		ret = rfcomm_dlc_send_frag(d, frag);
 		if (ret < 0) {
-			kfree_skb(frag);
+			dev_kfree_skb_irq(frag);
 			goto unlock;
 		}
 



[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