diff options
author | David Hildenbrand <david@redhat.com> | 2017-08-30 19:06:00 +0300 |
---|---|---|
committer | Christian Borntraeger <borntraeger@de.ibm.com> | 2017-08-31 14:49:39 +0300 |
commit | 8149fc07724a1eee65d772749935bd923ae4f686 (patch) | |
tree | 224fda511f003976bb19b772b56f0dc41a493e8d /arch/s390/kvm | |
parent | 1935222dc2f22ea885e7a7ece6d1be586aafe4a1 (diff) | |
download | linux-8149fc07724a1eee65d772749935bd923ae4f686.tar.xz |
KVM: s390: guestdbg: fix range check
Looks like the "overflowing" range check is wrong.
|=======b-------a=======|
addr >= a || addr <= b
Signed-off-by: David Hildenbrand <david@redhat.com>
Message-Id: <20170830160603.5452-2-david@redhat.com>
Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Diffstat (limited to 'arch/s390/kvm')
-rw-r--r-- | arch/s390/kvm/guestdbg.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/s390/kvm/guestdbg.c b/arch/s390/kvm/guestdbg.c index c2e0ddc1356e..bcbd86621d01 100644 --- a/arch/s390/kvm/guestdbg.c +++ b/arch/s390/kvm/guestdbg.c @@ -308,7 +308,7 @@ static inline int in_addr_range(u64 addr, u64 a, u64 b) return (addr >= a) && (addr <= b); else /* "overflowing" interval */ - return (addr <= a) && (addr >= b); + return (addr >= a) || (addr <= b); } #define end_of_range(bp_info) (bp_info->addr + bp_info->len - 1) |