Brian Norris
fd3afb81f4
clk: fix leak on devm_clk_bulk_get_all() unwind
...
commit f828b0bcacef189edbd247e9f48864fc36bfbe33 upstream.
clk_bulk_get_all() allocates an array of struct clk_bulk data for us
(unlike clk_bulk_get()), so we need to free it. Let's use the
clk_bulk_put_all() helper.
kmemleak complains, on an RK3399 Gru/Kevin system:
unreferenced object 0xffffff80045def00 (size 128):
comm "swapper/0", pid 1, jiffies 4294667682 (age 86.394s)
hex dump (first 32 bytes):
44 32 60 fe fe ff ff ff 00 00 00 00 00 00 00 00 D2`.............
48 32 60 fe fe ff ff ff 00 00 00 00 00 00 00 00 H2`.............
backtrace:
[<00000000742860d6>] __kmalloc+0x22c/0x39c
[<00000000b0493f2c>] clk_bulk_get_all+0x64/0x188
[<00000000325f5900>] devm_clk_bulk_get_all+0x58/0xa8
[<00000000175b9bc5>] dwc3_probe+0x8ac/0xb5c
[<000000009169e2f9>] platform_drv_probe+0x9c/0xbc
[<000000005c51e2ee>] really_probe+0x13c/0x378
[<00000000c47b1f24>] driver_probe_device+0x84/0xc0
[<00000000f870fcfb>] __device_attach_driver+0x94/0xb0
[<000000004d1b92ae>] bus_for_each_drv+0x8c/0xd8
[<00000000481d60c3>] __device_attach+0xc4/0x150
[<00000000a163bd36>] device_initial_probe+0x1c/0x28
[<00000000accb6bad>] bus_probe_device+0x3c/0x9c
[<000000001a199f89>] device_add+0x218/0x3cc
[<000000001bd84952>] of_device_add+0x40/0x50
[<000000009c658c29>] of_platform_device_create_pdata+0xac/0x100
[<0000000021c69ba4>] of_platform_bus_create+0x190/0x224
Fixes: f08c2e2865f6 ("clk: add managed version of clk_bulk_get_all")
Cc: Dong Aisheng <aisheng.dong@nxp.com>
Cc: stable@vger.kernel.org
Signed-off-by: Brian Norris <briannorris@chromium.org>
Link: https://lore.kernel.org/r/20210731025950.2238582-1-briannorris@chromium.org
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-08-12 13:22:11 +02:00
..
2021-07-14 16:56:31 +02:00
2020-12-30 11:54:01 +01:00
2019-06-19 17:09:55 +02:00
2019-10-16 16:17:50 -07:00
2020-10-13 19:48:34 -07:00
2020-12-30 11:54:00 +01:00
2020-10-22 12:53:28 -07:00
2019-11-27 08:14:17 -08:00
2020-06-14 01:57:21 +09:00
2021-07-14 16:56:20 +02:00
2020-12-30 11:54:25 +01:00
2020-09-22 12:58:52 -07:00
2020-10-20 11:46:47 -07:00
2021-07-14 16:56:16 +02:00
2019-12-23 18:53:13 -08:00
2021-02-03 23:28:44 +01:00
2021-05-14 09:50:17 +02:00
2020-10-13 19:49:11 -07:00
2021-07-14 16:56:31 +02:00
2021-07-19 09:44:42 +02:00
2020-10-22 12:53:28 -07:00
2021-05-19 10:13:19 +02:00
2020-06-25 15:04:13 -07:00
2020-10-13 19:54:30 -07:00
2021-07-14 16:55:44 +02:00
2020-07-16 12:32:26 -07:00
2020-06-10 11:42:19 -07:00
2020-07-16 12:32:25 -07:00
2020-04-14 09:21:05 +02:00
2021-03-04 11:37:58 +01:00
2021-08-12 13:22:04 +02:00
2020-12-30 11:53:58 +01:00
2021-05-14 09:50:26 +02:00
2020-01-04 23:27:15 -08:00
2020-09-10 00:57:42 -07:00
2020-08-15 08:18:22 -07:00
2019-08-16 10:20:15 -07:00
2021-05-14 09:50:26 +02:00
2020-04-13 12:20:06 -07:00
2019-11-26 10:02:48 -08:00
2019-09-06 15:17:02 -07:00
2021-05-14 09:50:23 +02:00
2020-10-13 19:44:40 -07:00
2019-06-19 17:09:55 +02:00
2020-01-24 07:22:47 +00:00
2019-12-24 00:10:33 -08:00
2019-09-17 13:26:31 -07:00
2020-07-10 17:15:34 -07:00
2019-09-06 10:31:16 -07:00
2020-08-22 12:38:06 +08:00
2021-08-12 13:22:11 +02:00
2021-03-04 11:38:06 +01:00
2019-06-19 17:09:55 +02:00
2020-09-22 12:44:14 -07:00
2020-09-22 12:44:14 -07:00
2020-12-30 11:53:42 +01:00
2020-07-16 12:35:15 -07:00
2020-07-10 17:15:34 -07:00
2020-05-28 21:06:39 -07:00
2019-08-16 10:20:07 -07:00
2019-08-16 10:20:15 -07:00
2020-01-06 23:10:05 -08:00
2019-06-19 17:09:55 +02:00
2020-02-03 23:03:49 -08:00
2020-06-17 20:42:10 +02:00
2020-10-13 19:48:09 -07:00
2019-07-15 20:18:40 -07:00
2020-12-30 11:54:01 +01:00
2020-07-13 09:40:21 +01:00
2019-06-27 13:45:38 -07:00
2021-07-14 16:56:31 +02:00
2020-07-10 17:15:34 -07:00
2020-07-28 18:17:56 -07:00
2021-08-12 13:22:03 +02:00
2021-07-14 16:56:19 +02:00
2021-04-14 08:42:10 +02:00
2019-07-12 11:00:14 -07:00
2019-06-19 17:09:55 +02:00
2020-10-20 11:47:07 -07:00
2020-07-28 18:17:56 -07:00