diff mbox series

[-next] Bluetooth: btusb: Do not call kfree_skb() under spin_lock_irqsave()

Message ID 20230823034638.1281539-1-ruanjinjie@huawei.com (mailing list archive)
State Accepted
Commit feed554a67ab7a602cd26cf6a4c44093dd54d4b9
Headers show
Series [-next] Bluetooth: btusb: Do not call kfree_skb() under spin_lock_irqsave() | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
tedd_an/CheckPatch success CheckPatch PASS
tedd_an/GitLint success Gitlint PASS
tedd_an/SubjectPrefix success Gitlint PASS
tedd_an/BuildKernel success BuildKernel PASS
tedd_an/CheckAllWarning success CheckAllWarning PASS
tedd_an/CheckSparse success CheckSparse PASS
tedd_an/CheckSmatch success CheckSparse PASS
tedd_an/BuildKernel32 success BuildKernel32 PASS
tedd_an/TestRunnerSetup success TestRunnerSetup PASS
tedd_an/TestRunner_l2cap-tester success TestRunner PASS
tedd_an/TestRunner_iso-tester success TestRunner PASS
tedd_an/TestRunner_bnep-tester success TestRunner PASS
tedd_an/TestRunner_mgmt-tester fail TestRunner_mgmt-tester: Total: 497, Passed: 496 (99.8%), Failed: 1, Not Run: 0
tedd_an/TestRunner_rfcomm-tester success TestRunner PASS
tedd_an/TestRunner_sco-tester success TestRunner PASS
tedd_an/TestRunner_ioctl-tester success TestRunner PASS
tedd_an/TestRunner_mesh-tester success TestRunner PASS
tedd_an/TestRunner_smp-tester success TestRunner PASS
tedd_an/TestRunner_userchan-tester success TestRunner PASS
tedd_an/IncrementalBuild success Incremental Build PASS

Commit Message

Jinjie Ruan Aug. 23, 2023, 3:46 a.m. UTC
It is not allowed to call kfree_skb() from hardware interrupt
context or with hardware interrupts being disabled.
So replace kfree_skb() with dev_kfree_skb_irq() under
spin_lock_irqsave(). Compile tested only.

Fixes: baac6276c0a9 ("Bluetooth: btusb: handle mSBC audio over USB Endpoints")
Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
---
 drivers/bluetooth/btusb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

bluez.test.bot@gmail.com Aug. 23, 2023, 4:45 a.m. UTC | #1
This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=778416

---Test result---

Test Summary:
CheckPatch                    PASS      2.85 seconds
GitLint                       PASS      0.34 seconds
SubjectPrefix                 PASS      0.10 seconds
BuildKernel                   PASS      43.27 seconds
CheckAllWarning               PASS      47.99 seconds
CheckSparse                   PASS      54.20 seconds
CheckSmatch                   PASS      148.09 seconds
BuildKernel32                 PASS      43.00 seconds
TestRunnerSetup               PASS      650.12 seconds
TestRunner_l2cap-tester       PASS      37.65 seconds
TestRunner_iso-tester         PASS      86.17 seconds
TestRunner_bnep-tester        PASS      15.61 seconds
TestRunner_mgmt-tester        FAIL      272.34 seconds
TestRunner_rfcomm-tester      PASS      22.86 seconds
TestRunner_sco-tester         PASS      26.37 seconds
TestRunner_ioctl-tester       PASS      25.81 seconds
TestRunner_mesh-tester        PASS      20.55 seconds
TestRunner_smp-tester         PASS      20.60 seconds
TestRunner_userchan-tester    PASS      16.39 seconds
IncrementalBuild              PASS      40.19 seconds

Details
##############################
Test: TestRunner_mgmt-tester - FAIL
Desc: Run mgmt-tester with test-runner
Output:
Total: 497, Passed: 496 (99.8%), Failed: 1, Not Run: 0

Failed Test Cases
LL Privacy - Unpair 1                                Timed out    2.104 seconds


---
Regards,
Linux Bluetooth
patchwork-bot+bluetooth@kernel.org Aug. 23, 2023, 11:50 p.m. UTC | #2
Hello:

This patch was applied to bluetooth/bluetooth-next.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:

On Wed, 23 Aug 2023 11:46:37 +0800 you wrote:
> It is not allowed to call kfree_skb() from hardware interrupt
> context or with hardware interrupts being disabled.
> So replace kfree_skb() with dev_kfree_skb_irq() under
> spin_lock_irqsave(). Compile tested only.
> 
> Fixes: baac6276c0a9 ("Bluetooth: btusb: handle mSBC audio over USB Endpoints")
> Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
> 
> [...]

Here is the summary with links:
  - [-next] Bluetooth: btusb: Do not call kfree_skb() under spin_lock_irqsave()
    https://git.kernel.org/bluetooth/bluetooth-next/c/feed554a67ab

You are awesome, thank you!
diff mbox series

Patch

diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index 1bb3b09013b0..52309ece6145 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -2162,7 +2162,7 @@  static int btusb_switch_alt_setting(struct hci_dev *hdev, int new_alts)
 		 * alternate setting.
 		 */
 		spin_lock_irqsave(&data->rxlock, flags);
-		kfree_skb(data->sco_skb);
+		dev_kfree_skb_irq(data->sco_skb);
 		data->sco_skb = NULL;
 		spin_unlock_irqrestore(&data->rxlock, flags);