Files
linux-stable-mirror/include/linux
Bartosz Golaszewski 371f53925a device property: set fwnode->secondary to NULL in fwnode_init()
commit 215c90ee65 upstream.

If a firmware node is allocated on the stack (for instance: temporary
software node whose life-time we control) or on the heap - but using a
non-zeroing allocation function - and initialized using fwnode_init(),
its secondary pointer will contain uninitalized memory which likely will
be neither NULL nor IS_ERR() and so may end up being dereferenced (for
example: in dev_to_swnode()). Set fwnode->secondary to NULL on
initialization.

Cc: stable <stable@kernel.org>
Fixes: 01bb86b380 ("driver core: Add fwnode_init()")
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Reviewed-by: Rafael J. Wysocki (Intel) <rafael@kernel.org>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Link: https://patch.msgid.link/20260506115701.23035-1-bartosz.golaszewski@oss.qualcomm.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-06-01 17:43:09 +02:00
..
2026-03-04 07:19:34 -05:00
2026-03-04 07:20:03 -05:00
2025-05-09 09:43:58 +02:00
2025-11-02 22:14:42 +09:00
2026-03-25 11:05:40 +01:00
2025-09-11 17:20:27 +02:00
2024-12-14 19:59:58 +01:00
2026-01-11 15:22:07 +01:00
2025-07-06 11:00:16 +02:00
2025-02-08 09:52:02 +01:00
2025-01-09 13:31:41 +01:00
2026-01-11 15:21:37 +01:00
2026-05-23 13:03:24 +02:00
2025-08-15 12:08:42 +02:00
2025-01-23 17:21:12 +01:00
2026-01-11 15:21:52 +01:00
2025-01-09 13:31:41 +01:00
2025-02-01 18:37:51 +01:00
2026-03-04 07:19:32 -05:00
2025-08-01 09:47:30 +01:00
2026-01-11 15:22:20 +01:00