]> git.baikalelectronics.ru Git - kernel.git/commit
drm/atomic: Clear crtcs, connectors and planes when clearing state
authorAnder Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Mon, 30 Mar 2015 07:41:19 +0000 (10:41 +0300)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 30 Mar 2015 09:39:30 +0000 (11:39 +0200)
commitbc09d2807aea459857d74b6fcd67c81c6ccf2086
treed1aeadd849f84f077a05c8c30e283b3d9da03ee6
parent37ac6fc4da8b8561ba237b2e487bb0abc44fe765
drm/atomic: Clear crtcs, connectors and planes when clearing state

Users of the atomic state assume that if the pointer to a crtc, plane or
connector is not NULL in the respective object vector, than the state
for that object in *_states vector also won't be NULL. That assumption
was broken by drm_atomic_state_clear(), which would clear the state
pointer but leave the pointer to the object still set.

This fixes a NULL pointer dereference in i915 caused by the use of
drm_atomic_state_clear().

Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/drm_atomic.c