All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/6] Bluetooth: don't call kfree_skb() under spin_lock_irqsave()
@ 2022-12-05 15:09 Yang Yingliang
  2022-12-05 15:09 ` [PATCH 1/6] Bluetooth: hci_qca: " Yang Yingliang
                   ` (5 more replies)
  0 siblings, 6 replies; 9+ messages in thread
From: Yang Yingliang @ 2022-12-05 15:09 UTC (permalink / raw)
  To: marcel, johan.hedberg, luiz.dentz; +Cc: linux-bluetooth, yangyingliang

It is not allowed to call kfree_skb() from hardware interrupt
context or with interrupts being disabled. This patchset is
trying to call kfree_skb() after spin_lock_irqsave().

Yang Yingliang (6):
  Bluetooth: hci_qca: don't call kfree_skb() under spin_lock_irqsave()
  Bluetooth: hci_ll: don't call kfree_skb() under spin_lock_irqsave()
  Bluetooth: hci_h5: don't call kfree_skb() under spin_lock_irqsave()
  Bluetooth: hci_bcsp: don't call kfree_skb() under spin_lock_irqsave()
  Bluetooth: hci_core: don't call kfree_skb() under spin_lock_irqsave()
  Bluetooth: RFCOMM: don't call kfree_skb() under spin_lock_irqsave()

 drivers/bluetooth/hci_bcsp.c | 6 +++++-
 drivers/bluetooth/hci_h5.c   | 6 +++++-
 drivers/bluetooth/hci_ll.c   | 3 ++-
 drivers/bluetooth/hci_qca.c  | 3 ++-
 net/bluetooth/hci_core.c     | 6 +++++-
 net/bluetooth/rfcomm/core.c  | 4 +++-
 6 files changed, 22 insertions(+), 6 deletions(-)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 9+ messages in thread
* [PATCH v2 1/6] Bluetooth: hci_qca: don't call kfree_skb() under spin_lock_irqsave()
@ 2022-12-07  2:18 Yang Yingliang
  2022-12-07  2:41 ` Bluetooth: " bluez.test.bot
  0 siblings, 1 reply; 9+ messages in thread
From: Yang Yingliang @ 2022-12-07  2:18 UTC (permalink / raw)
  To: marcel, johan.hedberg, luiz.dentz; +Cc: linux-bluetooth, yangyingliang

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: 0ff252c1976d ("Bluetooth: hciuart: Add support QCA chipset for UART")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
 drivers/bluetooth/hci_qca.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
index 8df11016fd51..bae9b2a408d9 100644
--- a/drivers/bluetooth/hci_qca.c
+++ b/drivers/bluetooth/hci_qca.c
@@ -912,7 +912,7 @@ static int qca_enqueue(struct hci_uart *hu, struct sk_buff *skb)
 	default:
 		BT_ERR("Illegal tx state: %d (losing packet)",
 		       qca->tx_ibs_state);
-		kfree_skb(skb);
+		dev_kfree_skb_irq(skb);
 		break;
 	}
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2022-12-07  2:41 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-05 15:09 [PATCH 0/6] Bluetooth: don't call kfree_skb() under spin_lock_irqsave() Yang Yingliang
2022-12-05 15:09 ` [PATCH 1/6] Bluetooth: hci_qca: " Yang Yingliang
2022-12-05 15:56   ` Bluetooth: " bluez.test.bot
2022-12-05 15:09 ` [PATCH 2/6] Bluetooth: hci_ll: " Yang Yingliang
2022-12-05 15:09 ` [PATCH 3/6] Bluetooth: hci_h5: " Yang Yingliang
2022-12-05 15:09 ` [PATCH 4/6] Bluetooth: hci_bcsp: " Yang Yingliang
2022-12-05 15:09 ` [PATCH 5/6] Bluetooth: hci_core: " Yang Yingliang
2022-12-05 15:09 ` [PATCH 6/6] Bluetooth: RFCOMM: " Yang Yingliang
  -- strict thread matches above, loose matches on Subject: below --
2022-12-07  2:18 [PATCH v2 1/6] Bluetooth: hci_qca: " Yang Yingliang
2022-12-07  2:41 ` Bluetooth: " bluez.test.bot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.