提交 8149fc07 编写于 作者: D David Hildenbrand 提交者: Christian Borntraeger

KVM: s390: guestdbg: fix range check

Looks like the "overflowing" range check is wrong.

|=======b-------a=======|

addr >= a || addr <= b
Signed-off-by: NDavid Hildenbrand <david@redhat.com>
Message-Id: <20170830160603.5452-2-david@redhat.com>
Reviewed-by: NChristian Borntraeger <borntraeger@de.ibm.com>
Reviewed-by: NCornelia Huck <cohuck@redhat.com>
Signed-off-by: NChristian Borntraeger <borntraeger@de.ibm.com>
上级 1935222d
...@@ -308,7 +308,7 @@ static inline int in_addr_range(u64 addr, u64 a, u64 b) ...@@ -308,7 +308,7 @@ static inline int in_addr_range(u64 addr, u64 a, u64 b)
return (addr >= a) && (addr <= b); return (addr >= a) && (addr <= b);
else else
/* "overflowing" interval */ /* "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) #define end_of_range(bp_info) (bp_info->addr + bp_info->len - 1)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册