[PATCH] riscv: mm: reserve the DTB before scanning reserved memory
Paul Walmsley
pjw at kernel.org
Tue Nov 17 19:35:42 PST 2026
On Wed, 4 Nov 2026, Marek Szyprowski wrote:
> early_init_fdt_scan_reserved_mem() allocates memory from memblock while
> it scans /reserved-memory: the reserved_mem array, and the regions that
> are placed dynamically by size. On RISC-V the DTB was only reserved
> after that scan, so memblock could hand out the memory the DTB occupies
> while the DTB was still being parsed.
>
> Reserve the DTB before the scan, so that memblock never allocates from
> it.
>
> Fixes: ef69d2559fe9 ("riscv: Move early dtb mapping into the fixmap region")
> Closes: https://lore.kernel.org/all/b71ac175-fba5-4f61-bbdb-0b98dec9ccee@samsung.com/
> Signed-off-by: Marek Szyprowski <m.szyprowski at samsung.com>
Thanks, queued for v7.4-rc with a stable@ cc.
- Paul
More information about the linux-riscv
mailing list