From: Tvrtko Ursulin Date: Fri, 26 Sep 2014 14:05:22 +0000 (+0100) Subject: drm/i915: Do not leak pages when freeing userptr objects X-Git-Tag: omap-for-v3.19/prcm-cleanup~70^2~4^2~2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c479f4383ea8940dd6f88da61798ad31feb33e51;p=pandora-kernel.git drm/i915: Do not leak pages when freeing userptr objects 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 Cc: Chris Wilson Cc: "Barbalho, Rafael" Tested-by: Rafael Barbalho Reviewed-by: Chris Wilson Cc: stable@vger.kernel.org [danvet: Remove unused local variable sg.] Signed-off-by: Daniel Vetter --- Reading git-diff-tree failed