Patch "Bluetooth: hci_core: 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: hci_core: 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-hci_core-don-t-call-kfree_skb-under-spin_l.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 27cdc6e748f4f959159eba19ee50e850683abfba
Author: Yang Yingliang <yangyingliang@xxxxxxxxxx>
Date:   Wed Dec 7 10:18:34 2022 +0800

    Bluetooth: hci_core: don't call kfree_skb() under spin_lock_irqsave()
    
    [ Upstream commit 39c1eb6fcbae8ce9bb71b2ac5cb609355a2b181b ]
    
    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: 9238f36a5a50 ("Bluetooth: Add request cmd_complete and cmd_status functions")
    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/hci_core.c b/net/bluetooth/hci_core.c
index 3d780220e2d1..e87777255c47 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -4331,7 +4331,7 @@ void hci_req_cmd_complete(struct hci_dev *hdev, u16 opcode, u8 status,
 			*req_complete_skb = bt_cb(skb)->hci.req_complete_skb;
 		else
 			*req_complete = bt_cb(skb)->hci.req_complete;
-		kfree_skb(skb);
+		dev_kfree_skb_irq(skb);
 	}
 	spin_unlock_irqrestore(&hdev->cmd_q.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