Bug 120691
Summary: | UART HCI memory leak | ||
---|---|---|---|
Product: | Drivers | Reporter: | nico.edev |
Component: | Bluetooth | Assignee: | linux-bluetooth (linux-bluetooth) |
Status: | RESOLVED PATCH_ALREADY_AVAILABLE | ||
Severity: | normal | CC: | ahanins, bastienphilbert, ingvarthorvald, loic.poulain, nroyer |
Priority: | P1 | ||
Hardware: | ARM | ||
OS: | Linux | ||
Kernel Version: | 4.7-rc3 | Subsystem: | |
Regression: | No | Bisected commit-id: | |
Attachments: |
Test Patch
kmemleak_csr8510a10 kmemleak_bcm4343w Bluetooth Test Patch |
Description
nico.edev
2016-06-20 13:46:40 UTC
Seems that this memory leak is due to the hci_ll (TI) proto. Don't think this comes from the generic hci-uart/ldisc part. To be sure, are you able to reproduce this issue with any other proto (hci_h4, hci_bcm, hci_intel..)? Unfortunately my BT module only support TI protocol and I don't have another one. Try the below attached patch. Created attachment 222571 [details]
Test Patch
Are you able to post the object kmemleak is complaining about at that particular address. I did not see your post and now I am in business trip. I will try next week and let you know. Thanks a lot. I tried the patch but problem is still there. Can you enable kmemleak and use the documentation here to find out what object is leaking,https://www.kernel.org/doc/Documentation/kmemleak.txt. I finally got BT modules with BT controller from Broadcom (BCM4343W: UART H4) and CSR (CSR8510A10: USB). The leak is present whatever the controller. In all cases kmemleak reports leaks in the BT controller driver (hci_ll, hci_h4, btusb) but also in hci_event. It looks like the leak is in the HCI layer. I will try to figure out what object is leaking in hci_event. Below are kmemleak logs for BCM4343W and CSR8510A10. Created attachment 227531 [details]
kmemleak_csr8510a10
Created attachment 227541 [details]
kmemleak_bcm4343w
See if the below patch fixes or does something new in terms of kmemleak warning(s) you are getting from these bluetooth drivers. Created attachment 227881 [details]
Bluetooth Test Patch
Can you see if that patch fixed the issue or do I need to write a new one. Unfortunately the leak is still there. Seems someone else has fixed this and moved it upstream so just close this bug. Exactly; I tried this patch and the leak disappeared: http://marc.info/?l=linux-bluetooth&m=147193208628547 |