diff options
author | Alex Williamson <alex.williamson@redhat.com> | 2013-06-15 20:27:19 +0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-09-27 04:15:50 +0400 |
commit | 4013fc200b4df078b77d2fc95de3446c65a9957d (patch) | |
tree | 11c747b2702cbbf70d0805abd4fdf1947649ff0b /block | |
parent | 150189a130c11c4f346fc8bdb211a102d6a0f201 (diff) | |
download | linux-4013fc200b4df078b77d2fc95de3446c65a9957d.tar.xz |
intel-iommu: Fix leaks in pagetable freeing
commit 3269ee0bd6686baf86630300d528500ac5b516d7 upstream.
At best the current code only seems to free the leaf pagetables and
the root. If you're unlucky enough to have a large gap (like any
QEMU guest with more than 3G of memory), only the first chunk of leaf
pagetables are freed (plus the root). This is a massive memory leak.
This patch re-writes the pagetable freeing function to use a
recursive algorithm and manages to not only free all the pagetables,
but does it without any apparent performance loss versus the current
broken version.
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Reviewed-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Joerg Roedel <joro@8bytes.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'block')
0 files changed, 0 insertions, 0 deletions