]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/bdw: Free PPGTT struct
authorBen Widawsky <benjamin.widawsky@intel.com>
Thu, 20 Feb 2014 19:47:07 +0000 (11:47 -0800)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 4 Mar 2014 14:53:58 +0000 (15:53 +0100)
commit50962ec1bd0d3dbaec642e4a288c9c1c1a449c6e
tree5fb2cbcdacd4efc0d8861ba71b8375b8ef107504
parentc060d687ec64f9378a90ccfefa88534fd97769bd
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>
drivers/gpu/drm/i915/i915_gem_context.c
drivers/gpu/drm/i915/i915_gem_gtt.c