s390/vmem: fix empty page tables cleanup under KASAN
authorVasily Gorbik <gor@linux.ibm.com>
Sat, 28 Jan 2023 16:35:12 +0000 (17:35 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Mar 2023 08:39:15 +0000 (09:39 +0100)
commit15a66714bf286f5d8b8e33e6abb6aa720a94b824
treeb6120143e619e889d720a8e90a26823e5cb5c649
parent6ce9a22fc0213e7979119dbd8a2d8bf05fbf1bc8
s390/vmem: fix empty page tables cleanup under KASAN

[ Upstream commit 108303b0a2d27cb14eed565e33e64ad9eefe5d7e ]

Commit b9ff81003cf1 ("s390/vmem: cleanup empty page tables") introduced
empty page tables cleanup in vmem code, but when the kernel is built
with KASAN enabled the code has no effect due to wrong KASAN shadow
memory intersection condition, which effectively ignores any memory
range below KASAN shadow. Fix intersection condition to make code
work as anticipated.

Fixes: b9ff81003cf1 ("s390/vmem: cleanup empty page tables")
Reviewed-by: Alexander Gordeev <agordeev@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/s390/mm/vmem.c