Luiz Augusto von Dentz
b938790e70
Bluetooth: hci_codec: Fix leaking content of local_codecs
...
The following memory leak can be observed when the controller supports
codecs which are stored in local_codecs list but the elements are never
freed:
unreferenced object 0xffff88800221d840 (size 32):
comm "kworker/u3:0", pid 36, jiffies 4294898739 (age 127.060s)
hex dump (first 32 bytes):
f8 d3 02 03 80 88 ff ff 80 d8 21 02 80 88 ff ff ..........!.....
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
backtrace:
[<ffffffffb324f557>] __kmalloc+0x47/0x120
[<ffffffffb39ef37d>] hci_codec_list_add.isra.0+0x2d/0x160
[<ffffffffb39ef643>] hci_read_codec_capabilities+0x183/0x270
[<ffffffffb39ef9ab>] hci_read_supported_codecs+0x1bb/0x2d0
[<ffffffffb39f162e>] hci_read_local_codecs_sync+0x3e/0x60
[<ffffffffb39ff1b3>] hci_dev_open_sync+0x943/0x11e0
[<ffffffffb396d55d>] hci_power_on+0x10d/0x3f0
[<ffffffffb30c99b4>] process_one_work+0x404/0x800
[<ffffffffb30ca134>] worker_thread+0x374/0x670
[<ffffffffb30d9108>] kthread+0x188/0x1c0
[<ffffffffb304db6b>] ret_from_fork+0x2b/0x50
[<ffffffffb300206a>] ret_from_fork_asm+0x1a/0x30
Cc: stable@vger.kernel.org
Fixes: 8961987f3f5f ("Bluetooth: Enumerate local supported codec and cache details")
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2023-09-20 11:03:11 -07:00
..
2023-08-11 11:36:50 -07:00
2022-01-17 05:49:30 +02:00
2023-08-11 11:37:22 -07:00
2023-09-01 09:38:00 -07:00
2022-12-12 18:29:54 -08:00
2022-11-25 13:01:55 -05:00
2020-02-28 08:30:02 +01:00
2023-08-11 11:49:16 -07:00
2021-06-26 07:12:41 +02:00
2023-08-11 11:52:13 -07:00
2022-08-08 17:04:37 -07:00
2021-11-02 19:37:52 +01:00
2023-08-11 11:56:54 -07:00
2023-02-13 18:34:48 +08:00
2021-04-27 17:05:53 -07:00
2023-08-24 12:22:05 -07:00
2022-07-22 17:13:56 -07:00
2022-12-02 13:09:31 -08:00
2021-09-07 14:09:18 -07:00
2023-09-20 11:02:22 -07:00
2023-09-20 11:03:11 -07:00
2023-08-11 11:47:44 -07:00
2021-09-22 16:17:13 +02:00
2023-09-20 11:03:11 -07:00
2023-08-11 11:54:59 -07:00
2023-09-20 10:55:29 -07:00
2023-08-11 11:37:42 -07:00
2023-09-20 11:03:11 -07:00
2023-06-29 10:52:18 -07:00
2023-09-20 11:02:02 -07:00
2022-12-12 14:19:24 -08:00
2023-06-29 10:48:35 -07:00
2023-08-11 11:37:22 -07:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2022-12-12 14:19:24 -08:00
2023-04-23 21:57:59 -07:00
2021-06-26 07:12:42 +02:00
2020-06-18 13:11:03 +03:00
2022-09-06 13:18:24 -07:00
2023-01-17 15:50:10 -08:00
2023-08-24 12:22:05 -07:00
2023-08-11 11:44:12 -07:00
2022-07-21 17:14:55 -07:00
2023-08-21 07:41:57 +01:00
2021-03-13 00:04:03 +11:00
2023-04-23 21:48:44 -07:00
2021-06-26 07:12:37 +02:00