mirror of
https://github.com/adulau/aha.git
synced 2024-12-27 19:26:25 +00:00
dma-debug: fix off-by-one error in overlap function
This patch fixes a bug in the overlap function which returned true if one region ends exactly before the second region begins. This is no overlap but the function returned true in that case. Cc: stable@kernel.org Reported-by: Andrew Randrianasulu <randrik@mail.ru> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
This commit is contained in:
parent
aa010efb7b
commit
c79ee4e466
1 changed files with 1 additions and 1 deletions
|
@ -862,7 +862,7 @@ static inline bool overlap(void *addr, u64 size, void *start, void *end)
|
|||
|
||||
return ((addr >= start && addr < end) ||
|
||||
(addr2 >= start && addr2 < end) ||
|
||||
((addr < start) && (addr2 >= end)));
|
||||
((addr < start) && (addr2 > end)));
|
||||
}
|
||||
|
||||
static void check_for_illegal_area(struct device *dev, void *addr, u64 size)
|
||||
|
|
Loading…
Reference in a new issue