diff options
| author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2026-03-29 19:27:48 -0700 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2026-03-31 09:55:26 +0200 |
| commit | b981e9e94c687b7b19ae8820963f005b842cb2f2 (patch) | |
| tree | 638f43b38068a504a840dc1a9a5ae236f23171d1 /fs/devfs/git@git.tavy.me:linux.git | |
| parent | 917e3ad3321e75ca0223d5ccf26ceda116aa51e1 (diff) | |
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: 298c9babadb8 ("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
Diffstat (limited to 'fs/devfs/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions
