]> 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)
commit6224098dbf8080efb9969bca6a0b9a8e879110f3
tree3a8fdba207e57b5d1e2c32f0f57ee5a17f3ca57d
parent7fe89353a87871ff14990a70ef6fc315a56702cb
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