drm/i915: Avoid NULL deref in get_pages() unwind after error.
authorChris Wilson <chris@chris-wilson.co.uk>
Fri, 12 Mar 2010 19:52:55 +0000 (19:52 +0000)
committerEric Anholt <eric@anholt.net>
Wed, 17 Mar 2010 20:17:24 +0000 (13:17 -0700)
commit1f2b10131f83f7caa67bf1273cec126b4283015d
treed1e447b0d39a04c065f7878603b9e66444a0b69f
parent59f2d0fc4bdfbbfabfa3715ba17d0609e5964c7e
drm/i915: Avoid NULL deref in get_pages() unwind after error.

Fixes:
  http://bugzilla.kernel.org/show_bug.cgi?id=15527
  NULL pointer dereference in i915_gem_object_save_bit_17_swizzle

BUG: unable to handle kernel NULL pointer dereference at (null)
IP: [<f82b5d2b>] i915_gem_object_save_bit_17_swizzle+0x5b/0xc0 [i915]
Call Trace:
[<f82aea55>] ? i915_gem_object_put_pages+0x125/0x150 [i915]
[<f82aeb71>] ? i915_gem_object_get_pages+0xf1/0x110 [i915]
[<f82b0de8>] ? i915_gem_object_bind_to_gtt+0xb8/0x2a0 [i915]
[<c02db74d>] ? drm_mm_get_block_generic+0x4d/0x180
[<f82b11cd>] ? i915_gem_mmap_gtt_ioctl+0x16d/0x240 [i915]
[<f82ae786>] ? i915_gem_madvise_ioctl+0x86/0x120 [i915]

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reported-by: maciej.rutecki@gmail.com
Cc: stable@kernel.org
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Eric Anholt <eric@anholt.net>
drivers/gpu/drm/i915/i915_gem.c