[PATCH 0/2] of: reserved_mem: fix stack overflow and make dynamic reserved region configurable
From: Wandun Chen
Date: Thu Jun 04 2026 - 03:39:26 EST
From: Wandun Chen <chenwandun@xxxxxxxxxxx>
Patch 1 fixes a stack buffer overflow in fdt_scan_reserved_mem() when the
DTS contains more than 64 reserved-memory regions.
Patch 2 makes the limit configurable via Kconfig
(OF_RESERVED_MEM_DYNAMIC_REGIONS) so platforms with many such regions
can modify it without patching the source.
Wandun Chen (2):
of: reserved_mem: avoid stack buffer overflow in
fdt_scan_reserved_mem()
of: reserved_mem: add config to extend dynamic reserved memory regions
drivers/of/Kconfig | 11 +++++++++++
drivers/of/of_private.h | 2 +-
drivers/of/of_reserved_mem.c | 6 ++++++
3 files changed, 18 insertions(+), 1 deletion(-)
--
2.43.0