summaryrefslogtreecommitdiff
path: root/block/blk-zoned.c
diff options
context:
space:
mode:
authorNam Cao <namcao@linutronix.de>2024-04-25 14:52:01 +0300
committerPalmer Dabbelt <palmer@rivosinc.com>2024-06-03 17:41:09 +0300
commit994af1825a2aa286f4903ff64a1c7378b52defe6 (patch)
tree0bd0dc5f245f88b8271f3df2f06af00d1a2bb56b /block/blk-zoned.c
parentc3f38fa61af77b49866b006939479069cd451173 (diff)
downloadlinux-994af1825a2aa286f4903ff64a1c7378b52defe6.tar.xz
riscv: fix overlap of allocated page and PTR_ERR
On riscv32, it is possible for the last page in virtual address space (0xfffff000) to be allocated. This page overlaps with PTR_ERR, so that shouldn't happen. There is already some code to ensure memblock won't allocate the last page. However, buddy allocator is left unchecked. Fix this by reserving physical memory that would be mapped at virtual addresses greater than 0xfffff000. Reported-by: Björn Töpel <bjorn@kernel.org> Closes: https://lore.kernel.org/linux-riscv/878r1ibpdn.fsf@all.your.base.are.belong.to.us Fixes: 76d2a0493a17 ("RISC-V: Init and Halt Code") Signed-off-by: Nam Cao <namcao@linutronix.de> Cc: <stable@vger.kernel.org> Tested-by: Björn Töpel <bjorn@rivosinc.com> Reviewed-by: Björn Töpel <bjorn@rivosinc.com> Reviewed-by: Mike Rapoport (IBM) <rppt@kernel.org> Link: https://lore.kernel.org/r/20240425115201.3044202-1-namcao@linutronix.de Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Diffstat (limited to 'block/blk-zoned.c')
0 files changed, 0 insertions, 0 deletions