diff options
| author | Breno Leitao <leitao@debian.org> | 2026-09-25 07:35:10 -0700 |
|---|---|---|
| committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2026-09-25 18:06:39 +0200 |
| commit | dbb3d99ee95c32711950850ddd33eb22a6042eb2 (patch) | |
| tree | c9d2342e433515fc09156cd29be15f980c6fcd88 /include/uapi/linux | |
| parent | 93f51579e7df248780214094418f205253383cc5 (diff) | |
| download | linux-next-dbb3d99ee95c32711950850ddd33eb22a6042eb2.tar.gz linux-next-dbb3d99ee95c32711950850ddd33eb22a6042eb2.zip | |
ACPICA: Fix memory leak in acpi_ds_create_field()
acpi_ds_create_field() allocates internal_pcc_buffer for operation
regions in the PCC address space.
The function runs once per field, so a second field on the
same region overwrites the pointer and orphans the previous buffer.
The matching ACPI_FREE() in acpi_ut_delete_internal_obj() only ever sees
the last one.
An arm64 platform whose SSDT declares regions with multiple fields each
leaks two buffers at boot, as detected by kmemleak:
unreferenced object 0xffff000051e65400 (size 192):
comm "swapper/0", pid 1, jiffies 4294668436
backtrace (crc 0):
__kmalloc_noprof
acpi_ds_create_field
acpi_ds_load2_end_op
acpi_ds_exec_end_op
acpi_ps_parse_loop
acpi_ps_parse_aml
acpi_ns_load_table
acpi_load_tables
acpi_init
Do not allocate a region if it was previously allocated before,
preserving the current design, but, not leaking memory.
Fixes: aa6ec56b574d ("ACPICA: ACPI 6.3: add PCC operation region support for AML interpreter")
Link: https://github.com/open-acpica/acpica/commit/c71849d476bb5f97ca1867849e893368e12a69e6
Signed-off-by: Breno Leitao <leitao@debian.org>
[ rjw: Subject tweak, fixed the Fixes: tag ]
Link: https://patch.msgid.link/20260925-acpica-pcc-field-leak-v2-1-e37008e715af@debian.org
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'include/uapi/linux')
0 files changed, 0 insertions, 0 deletions
