riscv: Fix range looking for kernel image memblock
authorAlexandre Ghiti <alex@ghiti.fr>
Mon, 17 Feb 2020 05:28:47 +0000 (00:28 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 25 Mar 2020 07:25:48 +0000 (08:25 +0100)
commitb557b2f00682ac04df75514c9e9d3ea43e3af675
tree7cba03f7d2f72ba805a6bf135e2bf00cb34a907d
parent1c2106d2d9c1e423f43e12f3c90c19b21aa4c006
riscv: Fix range looking for kernel image memblock

[ Upstream commit a160eed4b783d7b250a32f7e5787c9867abc5686 ]

When looking for the memblock where the kernel lives, we should check
that the memory range associated to the memblock entirely comprises the
kernel image and not only intersects with it.

Signed-off-by: Alexandre Ghiti <alex@ghiti.fr>
Reviewed-by: Anup Patel <anup@brainfault.org>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/riscv/mm/init.c