diff options
author | Alex Williamson <alex.williamson@redhat.com> | 2013-06-26 00:01:44 +0200 |
---|---|---|
committer | Alex Williamson <alex.williamson@redhat.com> | 2013-06-26 00:01:44 +0200 |
commit | f5bfdbf252ad54aa4b6f765cbe89750087fcc155 (patch) | |
tree | 1f50d34490728738156a8ae486f816ee85131fd1 /drivers/vfio/vfio.c | |
parent | vfio: fix documentation (diff) | |
download | linux-f5bfdbf252ad54aa4b6f765cbe89750087fcc155.tar.xz linux-f5bfdbf252ad54aa4b6f765cbe89750087fcc155.zip |
vfio/type1: Fix missed frees and zero sized removes
With hugepage support we can only properly aligned and sized ranges.
We only guarantee that we can unmap the same ranges mapped and not
arbitrary sub-ranges. This means we might not free anything or might
free more than requested. The vfio unmap interface started storing
the unmapped size to return to userspace to handle this. This patch
fixes a few places where we don't properly handle those cases, moves
a memory allocation to a place where failure is an option and checks
our loops to make sure we don't get into an infinite loop trying to
remove an overlap.
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Diffstat (limited to 'drivers/vfio/vfio.c')
0 files changed, 0 insertions, 0 deletions