mirror-linux/arch/x86/platform
Dmitry Torokhov b981e9e94c x86/platform/geode: Fix on-stack property data use-after-return bug
The PROPERTY_ENTRY_GPIO macro (and by extension PROPERTY_ENTRY_REF)
creates a temporary software_node_ref_args structure on the stack
when used in a runtime assignment. This results in the property
pointing to data that is invalid once the function returns.

Fix this by ensuring the GPIO reference data is not stored on stack and
using PROPERTY_ENTRY_REF_ARRAY_LEN() to point directly to the persistent
reference data.

Fixes: 298c9babad ("x86/platform/geode: switch GPIO buttons and LEDs to software properties")
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Rafael J. Wysocki <rafael@kernel.org>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Daniel Scally <djrscally@gmail.com>
Cc: Danilo Krummrich <dakr@kernel.org>
Cc: Hans de Goede <hansg@kernel.org>
Cc: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Cc: Sakari Ailus <sakari.ailus@linux.intel.com>
Cc: stable@vger.kernel.org
Link: https://patch.msgid.link/20260329-property-gpio-fix-v2-1-3cca5ba136d8@gmail.com
2026-03-31 09:55:26 +02:00
..
atom x86/platform/atom: Switch to new Intel CPU model defines 2024-06-03 09:49:00 +03:00
ce4100 serial: 8250: Move CE4100 quirks to a module under 8250 driver 2025-06-29 14:24:46 +02:00
efi x86/efi: efi_unmap_boot_services: fix calculation of ranges_to_free size 2026-03-20 15:31:10 +01:00
geode x86/platform/geode: Fix on-stack property data use-after-return bug 2026-03-31 09:55:26 +02:00
intel x86/platform/iosf_mbi: Remove unused iosf_mbi_unregister_pmic_bus_access_notifier() 2025-04-01 20:31:39 +02:00
intel-mid x86/platform/intel-mid: Replace deprecated PCI functions 2024-11-11 11:59:21 +01:00
intel-quark x86/cpu: Fix FAM5_QUARK_X1000 to use X86_MATCH_VFM() 2024-10-31 12:02:21 -07:00
iris x86/platform: Switch back to struct platform_driver::remove() 2024-10-21 17:20:30 +02:00
olpc x86/platform/olpc: Replace strcpy() with strscpy() in xo15_sci_add() 2026-01-05 15:58:57 +01:00
pvh x86/PVH: Use boot params to pass RSDP address in start_info page 2026-03-03 15:06:19 +01:00
scx200 treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
ts5500 treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
uv x86/apic: Convert to IRQCHIP_MOVE_DEFERRED 2025-01-15 21:38:53 +01:00
Makefile Simple Firmware Interface (SFI) support removal for v5.12-rc1 2021-02-24 10:35:29 -08:00