fbarray: fix overlap check
When we're attaching fbarrays in secondary processes, we check for
whether the intended memory address for the fbarray is already in use by
some other, local fbarray. However, the check for end-overlap (i.e. to
see if our memory area's end overlaps with some other fbarray) is
incorrectly counting end offset as part of the overlap. Fix the check.
Fixes: 5b61c62cfd
("fbarray: add internal tailq for mapped areas")
Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Tested-by: Zhihong Peng <zhihongx.peng@intel.com>
This commit is contained in:
parent
c691506798
commit
27ff8384de
@ -110,7 +110,7 @@ overlap(const struct mem_area *ma, const void *start, size_t len)
|
||||
if (start >= ma_start && start < ma_end)
|
||||
return 1;
|
||||
/* end overlap? */
|
||||
if (end >= ma_start && end < ma_end)
|
||||
if (end > ma_start && end < ma_end)
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user