* [PATCH] Bluetooth: btintel_pcie: Clear bus master before freeing DMA buffers
@ 2026-11-30 0:32 Yuho Choi
2026-11-30 5:04 ` bluez.test.bot
0 siblings, 1 reply; 2+ messages in thread
From: Yuho Choi @ 2026-11-30 0:32 UTC (permalink / raw)
To: Marcel Holtmann, Luiz Augusto von Dentz
Cc: Kiran K, Ajaykv, Tedd Ho-Jeong An, linux-bluetooth, linux-kernel,
Yuho Choi
btintel_pcie_remove() and the probe error path free the RX/TX buffers
and the DMA pool before calling pci_clear_master(). The result of
btintel_pcie_reset_bt() is ignored there, so a controller that failed
to reset can still write to the freed buffers. Clear bus master before
freeing them.
Fixes: c2b636b3f788 ("Bluetooth: btintel_pcie: Add support for PCIe transport")
Fixes: 8bb9a261e856 ("Bluetooth: btintel_pcie: Add initial YoYo debug support")
Signed-off-by: Yuho Choi <oss.patchbox@gmail.com>
---
I used an LLM to help write this patch and its changelog.
Compile-tested only: QEMU has no Intel Bluetooth PCIe controller, and
KASAN cannot see writes made by the device. Based on bluetooth-next,
where the probe error path frees the buffers since 8bb9a261e856.
drivers/bluetooth/btintel_pcie.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/bluetooth/btintel_pcie.c b/drivers/bluetooth/btintel_pcie.c
index 3b2c8bbb36e9..ceba0fbc5405 100644
--- a/drivers/bluetooth/btintel_pcie.c
+++ b/drivers/bluetooth/btintel_pcie.c
@@ -4972,14 +4972,14 @@ static int btintel_pcie_probe(struct pci_dev *pdev,
if (pcie_configured)
btintel_pcie_probe_cleanup(data);
+ pci_clear_master(pdev);
+
if (data->pcie_alloc_init)
btintel_pcie_free(data);
destroy_workqueue(data->dump_workqueue);
destroy_workqueue(data->workqueue);
- pci_clear_master(pdev);
-
pci_set_drvdata(pdev, NULL);
return err;
@@ -5043,10 +5043,10 @@ static void btintel_pcie_remove(struct pci_dev *pdev)
destroy_workqueue(data->dump_workqueue);
destroy_workqueue(data->workqueue);
- btintel_pcie_free(data);
-
pci_clear_master(pdev);
+ btintel_pcie_free(data);
+
pci_set_drvdata(pdev, NULL);
}
base-commit: f57f78086ab54f3b3122fbaeba2c842ba7bb6d00
--
2.56.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* RE: Bluetooth: btintel_pcie: Clear bus master before freeing DMA buffers
2026-11-30 0:32 [PATCH] Bluetooth: btintel_pcie: Clear bus master before freeing DMA buffers Yuho Choi
@ 2026-11-30 5:04 ` bluez.test.bot
0 siblings, 0 replies; 2+ messages in thread
From: bluez.test.bot @ 2026-11-30 5:04 UTC (permalink / raw)
To: linux-bluetooth, oss.patchbox
[-- Attachment #1: Type: text/plain, Size: 1020 bytes --]
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/series/1226106/
---Test result---
Test Summary:
CheckPatch PASS 0.48 seconds
VerifyFixes PASS 0.06 seconds
VerifySignedoff PASS 0.06 seconds
GitLint PASS 0.19 seconds
SubjectPrefix PASS 0.05 seconds
BuildKernel PASS 24.59 seconds
CheckAllWarning PASS 28.38 seconds
CheckSparse PASS 30.83 seconds
BuildKernel32 PASS 24.79 seconds
CheckKernelLLVM PASS 25.19 seconds
TestRunnerSetup PASS 567.32 seconds
IncrementalBuild PASS 23.98 seconds
https://github.com/bluez/bluetooth-next/pull/1251
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-11-30 5:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-30 0:32 [PATCH] Bluetooth: btintel_pcie: Clear bus master before freeing DMA buffers Yuho Choi
2026-11-30 5:04 ` bluez.test.bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox