linux-stable/drivers/acpi
Jonathan Cameron 47c310fbaa ACPI: processor: Fix memory leaks in error paths of processor_add()
[ Upstream commit 47ec9b417e ]

If acpi_processor_get_info() returned an error, pr and the associated
pr->throttling.shared_cpu_map were leaked.

The unwind code was in the wrong order wrt to setup, relying on
some unwind actions having no affect (clearing variables that were
never set etc).  That makes it harder to reason about so reorder
and add appropriate labels to only undo what was actually set up
in the first place.

Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Gavin Shan <gshan@redhat.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Link: https://lore.kernel.org/r/20240529133446.28446-6-Jonathan.Cameron@huawei.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-09-12 11:11:42 +02:00
..
acpica ACPICA: Add a depth argument to acpi_execute_reg_methods() 2024-08-29 17:33:13 +02:00
apei ACPI: APEI: set memory failure flags as MF_ACTION_REQUIRED on synchronous events 2024-02-05 20:14:15 +00:00
arm64 Char/Misc driver changes for 6.6-rc1 2023-09-01 09:53:54 -07:00
dptf ACPI: DPTF: Drop stale link from Kconfig help 2022-09-28 17:26:25 +02:00
nfit ACPI: NFIT: Install Notify() handler before getting NFIT table 2023-10-22 12:47:43 +02:00
numa x86/numa: Fix SRAT lookup of CFMWS ranges with numa_fill_memblks() 2024-06-12 11:11:50 +02:00
pmic ACPI: PMIC: Add comments with DSDT power opregion field names 2023-01-30 16:47:13 +01:00
riscv drivers/acpi: RISC-V: Add RHCT related code 2023-06-01 08:45:04 -07:00
x86 ACPI: x86: Add PNP_UART1_SKIP quirk for Lenovo Blade2 tablets 2024-06-27 13:49:01 +02:00
ac.c ACPI: AC: Install Notify() handler directly 2023-07-14 18:58:34 +02:00
acpi_adxl.c
acpi_apd.c ACPI: processor: Check for null return of devm_kzalloc() in fch_misc_setup() 2023-03-20 18:04:58 +01:00
acpi_cmos_rtc.c ACPI: TAD: Install SystemCMOS address space handler for ACPI000E 2023-08-17 20:01:24 +02:00
acpi_configfs.c
acpi_dbg.c
acpi_extlog.c ACPI: extlog: fix NULL pointer dereference check 2024-02-05 20:14:15 +00:00
acpi_ffh.c ACPI: FFH: Drop the inclusion of linux/arm-smccc.h 2023-06-12 19:28:20 +02:00
acpi_fpdt.c ACPI: FPDT: properly handle invalid FPDT subtables 2023-11-28 17:20:03 +00:00
acpi_ipmi.c
acpi_lpat.c
acpi_lpit.c ACPI: LPIT: Avoid u32 multiplication overflow 2024-01-25 15:35:14 -08:00
acpi_lpss.c ACPI: LPSS: Advertise number of chip selects via property 2024-06-12 11:11:40 +02:00
acpi_memhotplug.c mm/memory_hotplug: allow memmap on memory hotplug request to fallback 2023-08-21 13:37:48 -07:00
acpi_pad.c ACPI: PAD: mark Zhaoxin CPUs NONSTOP TSC correctly 2023-06-12 19:25:55 +02:00
acpi_pcc.c ACPI: PCC: Setup PCC Opregion handler only if platform interrupt is available 2022-11-23 19:06:56 +01:00
acpi_platform.c ACPI: platform: Move SMB0001 HID to the header and reuse 2023-07-04 19:28:20 +02:00
acpi_pnp.c ACPI: PNP: Introduce list of known non-PNP devices 2023-01-17 12:52:11 +01:00
acpi_processor.c ACPI: processor: Fix memory leaks in error paths of processor_add() 2024-09-12 11:11:42 +02:00
acpi_tad.c ACPI: TAD: Install SystemCMOS address space handler for ACPI000E 2023-08-17 20:01:24 +02:00
acpi_video.c ACPI: video: Add quirk for the Colorful X15 AT 23 Laptop 2024-02-05 20:14:15 +00:00
acpi_watchdog.c
battery.c ACPI: battery: create alarm sysfs attribute atomically 2024-08-14 13:58:42 +02:00
bgrt.c
blacklist.c
bus.c ACPI: bus: Move acpi_arm_init() to the place of after acpi_ghes_init() 2023-10-18 13:26:30 +02:00
button.c Merge branches 'acpi-thermal' and 'acpi-button' 2023-06-26 17:20:28 +02:00
container.c ACPI: container: Use acpi_dev_for_each_child() 2022-06-20 20:33:05 +02:00
cppc_acpi.c ACPI: CPPC: Add helper to get the highest performance value 2024-09-12 11:11:40 +02:00
custom_method.c
debugfs.c
device_pm.c ACPI: PM: Add acpi_device_fix_up_power_children() function 2023-12-03 07:33:07 +01:00
device_sysfs.c ACPI: sysfs: Fix create_pnp_modalias() and create_of_modalias() 2023-11-20 11:59:03 +01:00
dock.c
ec.c ACPI: EC: Evaluate _REG outside the EC scope more carefully 2024-08-29 17:33:13 +02:00
ec_sys.c
event.c
evged.c
fan.h ACPI: DPTF: Support Meteor Lake 2022-05-25 15:37:07 +02:00
fan_attr.c ACPI: fan: Convert to use sysfs_emit_at() API 2022-12-06 12:44:14 +01:00
fan_core.c ACPI: fan: Bail out if extract package failed 2022-11-23 19:31:57 +01:00
glue.c ACPI: Fix selecting wrong ACPI fwnode for the iGPU on some Dell laptops 2023-01-10 20:23:48 +01:00
hed.c ACPI: HED: Install Notify() handler directly 2023-07-14 18:58:34 +02:00
internal.h ACPI: EC: Evaluate _REG outside the EC scope more carefully 2024-08-29 17:33:13 +02:00
ioapic.c ACPI: Silence missing prototype warnings 2022-12-30 19:12:30 +01:00
irq.c ACPI: irq: Fix incorrect return value in acpi_register_gsi() 2023-10-18 13:11:04 +02:00
Kconfig acpi/prmt: Use EFI runtime sandbox to invoke PRM handlers 2023-08-22 10:39:26 +02:00
Makefile ACPI: Move AMBA bus scan handling into arm64 specific directory 2023-08-01 13:59:25 +02:00
nvs.c
osi.c ACPI: OSI: Remove Linux-HPI-Hybrid-Graphics _OSI string 2022-08-25 20:18:17 +02:00
osl.c ACPI: OSL: Make should_use_kmap() 0 for RISC-V 2023-06-01 08:45:00 -07:00
pci_irq.c ACPI / PCI: fix LPIC IRQ model default PCI IRQ polarity 2022-11-26 12:57:18 +00:00
pci_link.c ACPI/PCI: Remove useless NULL pointer checks 2022-07-27 21:21:27 +02:00
pci_mcfg.c PCI: loongson: Add ACPI init support 2022-07-14 15:25:36 -05:00
pci_root.c PCI/CXL: Export native CXL error reporting control 2023-01-05 13:31:27 -08:00
pci_slot.c
pfr_telemetry.c mm: replace vma->vm_flags direct modifications with modifier calls 2023-02-09 16:51:39 -08:00
pfr_update.c iov_iter work; most of that is about getting rid of 2022-12-12 18:29:54 -08:00
platform_profile.c
power.c ACPI: PM: Do not turn of unused power resources on the Toshiba Click Mini 2023-04-27 18:44:43 +02:00
pptt.c ACPI: PPTT: Fix to avoid sleep in the atomic context when PPTT is absent 2023-03-14 20:34:38 +01:00
prmt.c acpi/prmt: Use EFI runtime sandbox to invoke PRM handlers 2023-08-22 10:39:26 +02:00
proc.c
processor_core.c ACPI: processor: LoongArch: Get physical ID from MADT 2023-08-17 18:39:28 +02:00
processor_driver.c ACPI: processor: Reorder acpi_processor_driver_init() 2023-03-22 15:20:38 +01:00
processor_idle.c ACPI: processor_idle: Fix invalid comparison with insertion sort for latency 2024-07-18 13:21:22 +02:00
processor_pdc.c ACPI: processor: Fix uninitialized access of buf in acpi_set_pdc_bits() 2023-09-18 12:16:16 +02:00
processor_perflib.c ACPI: processor: perflib: Avoid updating frequency QoS unnecessarily 2022-12-30 19:10:02 +01:00
processor_thermal.c ACPI: processor: thermal: Update CPU cooling devices on cpufreq policy changes 2023-03-22 15:20:38 +01:00
processor_throttling.c ACPI: processor: throttling: remove variable count 2022-10-28 19:02:45 +02:00
property.c acpi: property: Let args be NULL in __acpi_node_get_property_reference 2024-01-25 15:35:51 -08:00
reboot.c
resource.c ACPI: resource: Do IRQ override on TongFang GXxHRXx and GMxHGxx 2024-06-16 13:47:33 +02:00
sbs.c ACPI: SBS: manage alarm sysfs attribute through psy core 2024-08-14 13:58:42 +02:00
sbshc.c ACPI: make remove callback of ACPI driver void 2022-11-23 19:11:22 +01:00
sbshc.h
scan.c ACPI: EC: Evaluate _REG outside the EC scope more carefully 2024-08-29 17:33:13 +02:00
sleep.c Revert "ACPI: PM: Block ASUS B1400CEAE from suspend to idle by default" 2024-04-13 13:07:36 +02:00
sleep.h ACPI: s2idle: Add a new ->check() callback for platform_s2idle_ops 2022-09-09 17:37:40 +02:00
spcr.c ACPI: SPCR: Amend indentation 2023-03-27 20:50:28 +02:00
sysfs.c ACPI: sysfs: Enable ACPI sysfs support for CCEL records 2023-03-27 20:43:58 +02:00
tables.c ACPI: tables: Print RINTC information when MADT is parsed 2023-06-01 08:44:59 -07:00
thermal.c ACPI: thermal: Fix acpi_thermal_unregister_thermal_zone() cleanup 2024-01-10 17:16:55 +01:00
tiny-power-button.c ACPI: tiny-power-button: Eliminate the driver notify callback 2023-06-16 19:48:09 +02:00
utils.c Merge branch 'acpi-uid' 2022-10-03 20:09:22 +02:00
video_detect.c ACPI: video: Add backlight=native quirk for Lenovo Slim 7 16ARH7 2024-06-27 13:49:02 +02:00
viot.c ACPI: VIOT: Initialize the correct IOMMU fwspec 2023-03-30 19:20:42 +02:00
wakeup.c