Devicetree
 help / color / mirror / Atom feed
* [PATCH 0/3] of: reserved_mem: fix a few reserved memory issues
@ 2026-08-14  8:14 Wandun Chen
  2026-08-14  8:14 ` [PATCH 1/3] of: reserved_mem: skip init for regions whose early reservation failed Wandun Chen
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Wandun Chen @ 2026-08-14  8:14 UTC (permalink / raw)
  To: robh, saravanak, devicetree, linux-kernel

From: Wandun Chen <chenwandun@lixiang.com>

This series fixes a few issues in the reserved-memory handling:

1. A region whose early reservation failed was still counted and
   initialized by the late scan, handing unprotected memory to a
   device. (patch 1)

2. A statically placed region overlapping an existing reservation was
   accepted, so the overlap could be used by two regions concurrently
   and freed on init failure. (patch 2)

3. A dynamically allocated no-map region was never returned to the
   buddy allocator when its driver init failed: only
   memblock_clear_nomap() was called, leaving the entry in
   memblock.reserved. (patch 3)

Sashiko reported the original issue in [1].

This is sent for review now; given the v7.2 release is closing, there
is no expectation to merge it this cycle.

[1] https://lore.kernel.org/all/20260806100605.2C2C01F000E9@smtp.kernel.org/

Wandun Chen (3):
  of: reserved_mem: skip init for regions whose early reservation failed
  of: reserved_mem: reject statically placed regions overlapping
    existing reservations
  of: reserved_mem: release dynamically allocated no-map region on init
    failure

 drivers/of/of_reserved_mem.c | 69 ++++++++++++++++++++++++++++--------
 1 file changed, 55 insertions(+), 14 deletions(-)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-08-14  9:03 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-14  8:14 [PATCH 0/3] of: reserved_mem: fix a few reserved memory issues Wandun Chen
2026-08-14  8:14 ` [PATCH 1/3] of: reserved_mem: skip init for regions whose early reservation failed Wandun Chen
2026-08-14  8:29   ` sashiko-bot
2026-08-14  8:14 ` [PATCH 2/3] of: reserved_mem: reject statically placed regions overlapping existing reservations Wandun Chen
2026-08-14  8:47   ` sashiko-bot
2026-08-14  8:14 ` [PATCH 3/3] of: reserved_mem: release dynamically allocated no-map region on init failure Wandun Chen
2026-08-14  9:03   ` sashiko-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox