]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
KVM: s390: Fix dat_crste_walk_range() early return
authorClaudio Imbrenda <imbrenda@linux.ibm.com>
Thu, 2 Jul 2026 15:24:05 +0000 (17:24 +0200)
committerChristian Borntraeger <borntraeger@linux.ibm.com>
Thu, 9 Jul 2026 08:26:10 +0000 (10:26 +0200)
commit4d4a21e38f1b87a76b3e63d4f837ff4e9b52d5a6
treeaf2ac1e0926dcf370f4a1d7436e81c43ffe984cb
parent866d03de6def89c386cdfd457b28a1f566e02565
KVM: s390: Fix dat_crste_walk_range() early return

If a walk entry handler for a lower level returns a value,
dat_crste_walk_range() will not return immediately, but instead loop
again and move to the next entry.

This means that some entries are potentially skipped, and early return
is ignored. Skipped entries might lead to all kinds of issues, given
that the caller expects them to not be skipped. Early return is often
used to interrupt a walk when a rescheduling is needed; if it is
ignored it can lead to stalls.

Fix by breaking from the loop immediately if the walk to a lower level
returned non-zero.

Fixes: 2db149a0a6c5 ("KVM: s390: KVM page table management functions: walks")
Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
Reviewed-by: Christian Borntraeger <borntraeger@linux.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@linux.ibm.com>
arch/s390/kvm/dat.c