From: David Hildenbrand Date: Thu, 12 May 2016 12:07:05 +0000 (+0200) Subject: KVM: s390: pfmf: handle address overflows X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=695be0e7a24a8875c347437566f2c44ba673580b;p=linux-beck.git KVM: s390: pfmf: handle address overflows In theory, end could always end up being < start, if overflowing to 0. Although very unlikely for now, let's just fix it. Reviewed-by: Christian Borntraeger Signed-off-by: David Hildenbrand Signed-off-by: Christian Borntraeger --- diff --git a/arch/s390/kvm/priv.c b/arch/s390/kvm/priv.c index 752a1ac1aab6..b8327b8fdb8f 100644 --- a/arch/s390/kvm/priv.c +++ b/arch/s390/kvm/priv.c @@ -715,7 +715,7 @@ static int handle_pfmf(struct kvm_vcpu *vcpu) return kvm_s390_inject_program_int(vcpu, PGM_SPECIFICATION); } - while (start < end) { + while (start != end) { unsigned long useraddr; /* Translate guest address to host address */