drm/i915: Do not leak pages when freeing userptr objects
authorTvrtko Ursulin <tvrtko.ursulin@intel.com>
Fri, 26 Sep 2014 14:05:22 +0000 (15:05 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 29 Sep 2014 13:31:01 +0000 (15:31 +0200)
sg_alloc_table_from_pages() can build us a table with coalesced ranges which
means we need to iterate over pages and not sg table entries when releasing
page references.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: "Barbalho, Rafael" <rafael.barbalho@intel.com>
Tested-by: Rafael Barbalho <rafael.barbalho@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: stable@vger.kernel.org
[danvet: Remove unused local variable sg.]
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>

No differences found