OSDN Git Service

MIPS: init: Ensure reserved memory regions are not added to bootmem
authorMarcin Nowakowski <marcin.nowakowski@imgtec.com>
Wed, 23 Nov 2016 13:43:44 +0000 (14:43 +0100)
committerRalf Baechle <ralf@linux-mips.org>
Tue, 3 Jan 2017 15:34:45 +0000 (16:34 +0100)
commite89ef66d7682f031f026eee6bba03c8c2248d2a9
tree3b6bcb90a6524ebb97734710c5d8845190f18406
parent269aa43aad0f96673478fe2446abe54d7ad42e8f
MIPS: init: Ensure reserved memory regions are not added to bootmem

Memories managed through boot_mem_map are generally expected to define
non-crossing areas. However, if part of a larger memory block is marked
as reserved, it would still be added to bootmem allocator as an
available block and could end up being overwritten by the allocator.

Prevent this by explicitly marking the memory as reserved it if exists
in the range used by bootmem allocator.

Signed-off-by: Marcin Nowakowski <marcin.nowakowski@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/14608/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/kernel/setup.c