KVM: s390: pfmf: handle address overflows
authorDavid Hildenbrand <dahi@linux.vnet.ibm.com>
Thu, 12 May 2016 12:07:05 +0000 (14:07 +0200)
committerChristian Borntraeger <borntraeger@de.ibm.com>
Fri, 10 Jun 2016 10:07:30 +0000 (12:07 +0200)
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 <borntraeger@de.ibm.com>
Signed-off-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
arch/s390/kvm/priv.c

index 752a1ac1aab62674ff8c2eb66ad4d335aab1bdde..b8327b8fdb8f9da7be04828acbc44e9b953aa436 100644 (file)
@@ -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 */