* [PATCH] Bluetooth: hci_qca: Fix memleak in qca_controller_memdump
@ 2021-01-02 5:47 Dinghao Liu
2021-01-02 6:20 ` bluez.test.bot
2021-01-06 7:50 ` [PATCH] " Marcel Holtmann
0 siblings, 2 replies; 3+ messages in thread
From: Dinghao Liu @ 2021-01-02 5:47 UTC (permalink / raw)
To: dinghao.liu, kjlu
Cc: Marcel Holtmann, Johan Hedberg, Luiz Augusto von Dentz,
Venkata Lakshmi Narayana Gubba, Balakrishna Godavarthi,
linux-bluetooth, linux-kernel
When __le32_to_cpu() fails, qca_memdump should be freed
just like when vmalloc() fails.
Fixes: d841502c79e3f ("Bluetooth: hci_qca: Collect controller memory dump during SSR")
Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn>
---
drivers/bluetooth/hci_qca.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
index 4a963682c702..5dbcb7c42b80 100644
--- a/drivers/bluetooth/hci_qca.c
+++ b/drivers/bluetooth/hci_qca.c
@@ -1024,7 +1024,9 @@ static void qca_controller_memdump(struct work_struct *work)
dump_size = __le32_to_cpu(dump->dump_size);
if (!(dump_size)) {
bt_dev_err(hu->hdev, "Rx invalid memdump size");
+ kfree(qca_memdump);
kfree_skb(skb);
+ qca->qca_memdump = NULL;
mutex_unlock(&qca->hci_memdump_lock);
return;
}
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* RE: Bluetooth: hci_qca: Fix memleak in qca_controller_memdump
2021-01-02 5:47 [PATCH] Bluetooth: hci_qca: Fix memleak in qca_controller_memdump Dinghao Liu
@ 2021-01-02 6:20 ` bluez.test.bot
2021-01-06 7:50 ` [PATCH] " Marcel Holtmann
1 sibling, 0 replies; 3+ messages in thread
From: bluez.test.bot @ 2021-01-02 6:20 UTC (permalink / raw)
To: linux-bluetooth, dinghao.liu
[-- Attachment #1: Type: text/plain, Size: 2024 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/project/bluetooth/list/?series=408121
---Test result---
##############################
Test: CheckPatch - PASS
##############################
Test: CheckGitLint - FAIL
workflow: Add workflow files for ci
1: T1 Title exceeds max length (92>72): "Merge ebae7f8517c946462e21bca36f1fe776e3b6120a into 77703368864492cd1fd9f4783ffcc3789e19fe5c"
3: B6 Body message is missing
Bluetooth: hci_qca: Fix memleak in qca_controller_memdump
1: T1 Title exceeds max length (92>72): "Merge ebae7f8517c946462e21bca36f1fe776e3b6120a into 77703368864492cd1fd9f4783ffcc3789e19fe5c"
3: B6 Body message is missing
##############################
Test: CheckBuildK - PASS
##############################
Test: CheckTestRunner: Setup - PASS
##############################
Test: CheckTestRunner: l2cap-tester - PASS
Total: 40, Passed: 34 (85.0%), Failed: 0, Not Run: 6
##############################
Test: CheckTestRunner: bnep-tester - PASS
Total: 1, Passed: 1 (100.0%), Failed: 0, Not Run: 0
##############################
Test: CheckTestRunner: mgmt-tester - PASS
Total: 416, Passed: 400 (96.2%), Failed: 0, Not Run: 16
##############################
Test: CheckTestRunner: rfcomm-tester - PASS
Total: 9, Passed: 9 (100.0%), Failed: 0, Not Run: 0
##############################
Test: CheckTestRunner: sco-tester - PASS
Total: 8, Passed: 8 (100.0%), Failed: 0, Not Run: 0
##############################
Test: CheckTestRunner: smp-tester - PASS
Total: 8, Passed: 8 (100.0%), Failed: 0, Not Run: 0
##############################
Test: CheckTestRunner: userchan-tester - PASS
Total: 3, Passed: 3 (100.0%), Failed: 0, Not Run: 0
---
Regards,
Linux Bluetooth
[-- Attachment #2: l2cap-tester.log --]
[-- Type: application/octet-stream, Size: 43339 bytes --]
[-- Attachment #3: bnep-tester.log --]
[-- Type: application/octet-stream, Size: 3530 bytes --]
[-- Attachment #4: mgmt-tester.log --]
[-- Type: application/octet-stream, Size: 546227 bytes --]
[-- Attachment #5: rfcomm-tester.log --]
[-- Type: application/octet-stream, Size: 11650 bytes --]
[-- Attachment #6: sco-tester.log --]
[-- Type: application/octet-stream, Size: 9885 bytes --]
[-- Attachment #7: smp-tester.log --]
[-- Type: application/octet-stream, Size: 11796 bytes --]
[-- Attachment #8: userchan-tester.log --]
[-- Type: application/octet-stream, Size: 5426 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Bluetooth: hci_qca: Fix memleak in qca_controller_memdump
2021-01-02 5:47 [PATCH] Bluetooth: hci_qca: Fix memleak in qca_controller_memdump Dinghao Liu
2021-01-02 6:20 ` bluez.test.bot
@ 2021-01-06 7:50 ` Marcel Holtmann
1 sibling, 0 replies; 3+ messages in thread
From: Marcel Holtmann @ 2021-01-06 7:50 UTC (permalink / raw)
To: Dinghao Liu
Cc: kjlu, Johan Hedberg, Luiz Augusto von Dentz,
Venkata Lakshmi Narayana Gubba, Balakrishna Godavarthi,
linux-bluetooth, linux-kernel
Hi Dinghao,
> When __le32_to_cpu() fails, qca_memdump should be freed
> just like when vmalloc() fails.
>
> Fixes: d841502c79e3f ("Bluetooth: hci_qca: Collect controller memory dump during SSR")
> Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn>
> ---
> drivers/bluetooth/hci_qca.c | 2 ++
> 1 file changed, 2 insertions(+)
patch has been to bluetooth-next tree.
Regards
Marcel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-01-06 7:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-02 5:47 [PATCH] Bluetooth: hci_qca: Fix memleak in qca_controller_memdump Dinghao Liu
2021-01-02 6:20 ` bluez.test.bot
2021-01-06 7:50 ` [PATCH] " Marcel Holtmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).