mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-19 10:14:23 +08:00
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>
This commit is contained in:
parent
1935222dc2
commit
8149fc0772
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user