summaryrefslogtreecommitdiffstats
path: root/arch/arm64/mm
diff options
context:
space:
mode:
authorWill Deacon2019-04-03 18:58:39 +0200
committerWill Deacon2019-04-03 19:35:08 +0200
commit70b3d237bd7f52d3322c750a358581bf5a267699 (patch)
tree6f21b5f5316a77d4abb446ac056ed75a7be8ce3b /arch/arm64/mm
parentarm64: cpu_ops: fix a leaked reference by adding missing of_node_put (diff)
downloadkernel-qcow2-linux-70b3d237bd7f52d3322c750a358581bf5a267699.tar.gz
kernel-qcow2-linux-70b3d237bd7f52d3322c750a358581bf5a267699.tar.xz
kernel-qcow2-linux-70b3d237bd7f52d3322c750a358581bf5a267699.zip
arm64: mm: Ensure we ignore the initrd if it is placed out of range
If the initrd payload isn't completely accessible via the linear map, then we print a warning during boot and nobble the virtual address of the payload so that we ignore it later on. Unfortunately, since commit c756c592e442 ("arm64: Utilize phys_initrd_start/phys_initrd_size"), the virtual address isn't initialised until later anyway, so we need to nobble the size of the payload to ensure that we don't try to use it later on. Fixes: c756c592e442 ("arm64: Utilize phys_initrd_start/phys_initrd_size") Reported-by: Pierre Kuo <vichy.kuo@gmail.com> Acked-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'arch/arm64/mm')
-rw-r--r--arch/arm64/mm/init.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c
index 43fa75601b3d..03a8a6888ec0 100644
--- a/arch/arm64/mm/init.c
+++ b/arch/arm64/mm/init.c
@@ -377,7 +377,7 @@ void __init arm64_memblock_init(void)
base + size > memblock_start_of_DRAM() +
linear_region_size,
"initrd not fully accessible via the linear mapping -- please check your bootloader ...\n")) {
- initrd_start = 0;
+ phys_initrd_size = 0;
} else {
memblock_remove(base, size); /* clear MEMBLOCK_ flags */
memblock_add(base, size);