Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ upstream commit 22677b0 ] Currently, new user mem maps are checked if they are adjacent to an existing mem map and if so, the mem map entries are merged. It didn't check for duplicate mem maps, so if the API is called with the same mem map multiple times, they will occupy multiple mem map entries. This will reduce the amount of entries available for unique mem maps. So check for duplicate mem maps and merge them into one mem map entry if any found. Fixes: 0cbce3a ("vfio: skip DMA map failure if already mapped") Suggested-by: Kevin Traynor <ktraynor@redhat.com> Signed-off-by: Yunjian Wang <wangyunjian@huawei.com> Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
- Loading branch information