]> git.ipfire.org Git - thirdparty/linux.git/commit
KVM: s390: Fix gmap_helper_zap_one_page() again
authorClaudio Imbrenda <imbrenda@linux.ibm.com>
Tue, 4 Nov 2025 15:40:48 +0000 (16:40 +0100)
committerHeiko Carstens <hca@linux.ibm.com>
Mon, 8 Dec 2025 12:06:14 +0000 (13:06 +0100)
commit2f393c228cc519ddf19b8c6c05bf15723241aa96
tree278c0cb064cab8d205d86c78e3120f8de7164e9b
parentf770950a4709af290f314e691897ec0003fbd8ae
KVM: s390: Fix gmap_helper_zap_one_page() again

A few checks were missing in gmap_helper_zap_one_page(), which can lead
to memory corruption in the guest under specific circumstances.

Add the missing checks.

Fixes: 5deafa27d9ae ("KVM: s390: Fix to clear PTE when discarding a swapped page")
Cc: stable@vger.kernel.org
Reported-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Tested-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Acked-by: Christian Borntraeger <borntraeger@linux.ibm.com>
Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
arch/s390/mm/gmap_helpers.c