]> git.baikalelectronics.ru Git - kernel.git/commit
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:33:00 +0000 (09:33 +0100)
commit745b2ff4c1ac357d25fe4a98980e0bb40a3552cf
treecf9d25f0275a9d467b757006718979ae6ecd46aa
parent8668d51c862c675b7699ec100260cc9eb2714f61
s390/vmem: fix empty page tables cleanup under KASAN

[ Upstream commit 7eb8eb333f4131c53b2ca07a0d17a6d736462b5c ]

Commit 2245fe9cff28 ("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: 2245fe9cff28 ("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