Armin Wolf
d351bcadab
ACPI: processor_idle: Fix memory leak in acpi_processor_power_exit()
[ Upstream commit e18afcb7b2a12b635ac10081f943fcf84ddacc51 ]
After unregistering the CPU idle device, the memory associated with
it is not freed, leading to a memory leak:
unreferenced object 0xffff896282f6c000 (size 1024):
comm "swapper/0", pid 1, jiffies 4294893170
hex dump (first 32 bytes):
00 00 00 00 0b 00 00 00 00 00 00 00 00 00 00 00 ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
backtrace (crc 8836a742):
[<ffffffff993495ed>] kmalloc_trace+0x29d/0x340
[<ffffffff9972f3b3>] acpi_processor_power_init+0xf3/0x1c0
[<ffffffff9972d263>] __acpi_processor_start+0xd3/0xf0
[<ffffffff9972d2bc>] acpi_processor_start+0x2c/0x50
[<ffffffff99805872>] really_probe+0xe2/0x480
[<ffffffff99805c98>] __driver_probe_device+0x78/0x160
[<ffffffff99805daf>] driver_probe_device+0x1f/0x90
[<ffffffff9980601e>] __driver_attach+0xce/0x1c0
[<ffffffff99803170>] bus_for_each_dev+0x70/0xc0
[<ffffffff99804822>] bus_add_driver+0x112/0x210
[<ffffffff99807245>] driver_register+0x55/0x100
[<ffffffff9aee4acb>] acpi_processor_driver_init+0x3b/0xc0
[<ffffffff990012d1>] do_one_initcall+0x41/0x300
[<ffffffff9ae7c4b0>] kernel_init_freeable+0x320/0x470
[<ffffffff99b231f6>] kernel_init+0x16/0x1b0
[<ffffffff99042e6d>] ret_from_fork+0x2d/0x50
Fix this by freeing the CPU idle device after unregistering it.
Fixes: 3d339dcbb5 ("cpuidle / ACPI : move cpuidle_device field out of the acpi_processor_power structure")
Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-03-26 18:22:35 -04:00
..
2023-09-23 10:48:15 +02:00
2022-04-15 14:14:54 +02:00
2021-10-20 11:23:04 +02:00
2023-03-03 11:40:07 +01:00
2021-11-26 11:36:16 +01:00
2021-07-20 16:16:12 +02:00
2021-03-04 09:39:51 +01:00
2020-11-05 11:08:47 +01:00
2024-02-23 08:12:44 +01:00
2024-01-25 14:33:31 -08:00
2022-08-25 11:14:59 +02:00
2023-08-11 11:45:01 +02:00
2020-12-30 11:26:08 +01:00
2024-02-23 08:12:44 +01:00
2020-03-20 11:55:52 +01:00
2023-03-11 16:31:36 +01:00
2021-07-20 16:15:46 +02:00
2020-11-24 13:27:19 +01:00
2022-08-25 11:15:30 +02:00
2021-05-22 10:59:12 +02:00
2020-12-30 11:26:08 +01:00
2023-11-20 10:29:17 +01:00
2023-05-30 12:42:08 +01:00
2020-11-22 10:02:26 +01:00
2021-03-30 14:37:02 +02:00
2023-10-25 11:17:02 +02:00
2021-07-20 16:15:46 +02:00
2020-11-05 11:08:42 +01:00
2024-03-26 18:22:35 -04:00
2020-04-23 10:30:20 +02:00
2024-01-25 14:33:38 -08:00
2020-12-30 11:26:08 +01:00
2021-05-22 10:59:45 +02:00
2022-08-25 11:14:59 +02:00
2022-06-06 08:24:20 +02:00
2021-05-07 10:49:25 +02:00
2023-06-09 10:24:02 +02:00
2023-09-23 10:48:15 +02:00