]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Fix null pointer dereference in ring cleanup code
authorJohn Harrison <John.C.Harrison@Intel.com>
Fri, 31 Oct 2014 12:00:26 +0000 (12:00 +0000)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 4 Nov 2014 22:22:14 +0000 (23:22 +0100)
commitc2101e79095a22f334782d72e849afba8c74c480
tree3a8fdba207e57b5d1e2c32f0f57ee5a17f3ca57d
parent263107eaef7909e98dee42610128516495360711
drm/i915: Fix null pointer dereference in ring cleanup code

If a ring failed to initialise for any reason then the error path would try to
clean up all rings including those that had not yet been allocated. The ring
clean up code did a check that the ring was valid before starting its work.
Unfortunately, that was after it had already dereferenced the ring to obtain a
dev_private pointer.

Signed-off-by: John Harrison <John.C.Harrison@Intel.com>
Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_lrc.c
drivers/gpu/drm/i915/intel_ringbuffer.c