summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_gem_gtt.c
diff options
context:
space:
mode:
authorBen Widawsky2014-02-20 20:47:07 +0100
committerDaniel Vetter2014-03-04 15:53:58 +0100
commitb18b6bde300e1abe30e8b27501411a4b4a95ffeb (patch)
tree5fb2cbcdacd4efc0d8861ba71b8375b8ef107504 /drivers/gpu/drm/i915/i915_gem_gtt.c
parentdrm/i915: Move ppgtt_release out of the header (diff)
downloadkernel-qcow2-linux-b18b6bde300e1abe30e8b27501411a4b4a95ffeb.tar.gz
kernel-qcow2-linux-b18b6bde300e1abe30e8b27501411a4b4a95ffeb.tar.xz
kernel-qcow2-linux-b18b6bde300e1abe30e8b27501411a4b4a95ffeb.zip
drm/i915/bdw: Free PPGTT struct
GEN8 never freed the PPGTT struct. As GEN8 doesn't use full PPGTT, the leak is small and only found on a module reload. ie. I don't think this needs to go to stable. v2: The very naive, kfree in gen8 ppgtt cleanup, is subject to a double free on PPGTT initialization failure. (Spotted by Imre). Instead this patch pulls the ppgtt struct freeing out of the cleanup and leaves it to the allocators/callers or the one doing the last kref_put as in standard convention Reported-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Ben Widawsky <ben@bwidawsk.net> Reviewed-by: Imre Deak <imre.deak@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_gem_gtt.c')
-rw-r--r--drivers/gpu/drm/i915/i915_gem_gtt.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
index 69a88d41a2a7..49e79fbee45d 100644
--- a/drivers/gpu/drm/i915/i915_gem_gtt.c
+++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
@@ -859,7 +859,6 @@ static void gen6_ppgtt_cleanup(struct i915_address_space *vm)
for (i = 0; i < ppgtt->num_pd_entries; i++)
__free_page(ppgtt->pt_pages[i]);
kfree(ppgtt->pt_pages);
- kfree(ppgtt);
}
static int gen6_ppgtt_init(struct i915_hw_ppgtt *ppgtt)