kernel_samsung_a53x/drivers/acpi
Armin Wolf 323f2c3632 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: 3d339dcbb56d ("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-11-19 08:44:45 +01:00
..
acpica Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
apei ACPI: APEI: set memory failure flags as MF_ACTION_REQUIRED on synchronous events 2024-11-18 12:13:09 +01:00
arm64 Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dptf Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
nfit Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
numa Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pmic Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
x86 Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ac.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
acpi_adxl.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
acpi_amba.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
acpi_apd.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
acpi_cmos_rtc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
acpi_configfs.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
acpi_dbg.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
acpi_extlog.c ACPI: extlog: fix NULL pointer dereference check 2024-11-18 12:13:09 +01:00
acpi_ipmi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
acpi_lpat.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
acpi_lpit.c ACPI: LPIT: Avoid u32 multiplication overflow 2024-11-18 12:12:20 +01:00
acpi_lpss.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
acpi_memhotplug.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
acpi_pad.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
acpi_platform.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
acpi_pnp.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
acpi_processor.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
acpi_tad.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
acpi_video.c ACPI: video: Add quirk for the Colorful X15 AT 23 Laptop 2024-11-18 12:13:09 +01:00
acpi_watchdog.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
battery.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bgrt.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
blacklist.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bus.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
button.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
container.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cppc_acpi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
custom_method.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
debugfs.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
device_pm.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
device_sysfs.c ACPI: sysfs: Fix create_pnp_modalias() and create_of_modalias() 2024-11-18 11:42:50 +01:00
dock.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ec.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ec_sys.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
event.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
evged.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fan.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fan.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
glue.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hed.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
internal.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ioapic.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq.c ACPI: irq: Fix incorrect return value in acpi_register_gsi() 2024-11-08 11:26:19 +01:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
nvs.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
osi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
osl.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pci_irq.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pci_link.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pci_mcfg.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pci_root.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pci_slot.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
power.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pptt.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
proc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
processor_core.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
processor_driver.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
processor_idle.c ACPI: processor_idle: Fix memory leak in acpi_processor_power_exit() 2024-11-19 08:44:45 +01:00
processor_pdc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
processor_perflib.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
processor_thermal.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
processor_throttling.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
property.c acpi: property: Let args be NULL in __acpi_node_get_property_reference 2024-11-18 12:12:49 +01:00
reboot.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
resource.c ACPI: resource: Add another DMI match for the TongFang GMxXGxx 2024-11-18 12:12:18 +01:00
sbs.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sbshc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sbshc.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
scan.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sleep.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sleep.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
spcr.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sysfs.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tables.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
thermal.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tiny-power-button.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
utils.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
video_detect.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
wakeup.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00