vfio: fix boundary check in region search
authorXiao Wang <xiao.w.wang@intel.com>
Fri, 20 Apr 2018 15:10:50 +0000 (23:10 +0800)
committerThomas Monjalon <thomas@monjalon.net>
Mon, 23 Apr 2018 19:24:22 +0000 (21:24 +0200)
commitb3a022b17c94196149ec1665584fe81341020a18
tree2e93a0f5b43f4db7d19c77daec9bc56e87973588
parente37effdc3d48c5f63871639c9007a10a5f57b825
vfio: fix boundary check in region search

A previously mapped region is skipped during the search, leading to
DMA unmap fails.

This patch fixes it and rewords the comment.

Fixes: 73a639085938 ("vfio: allow to map other memory regions")

Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
lib/librte_eal/linuxapp/eal/eal_vfio.c