drm/atomic: Fix potential use of state after free
authorAnder Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Fri, 23 Jan 2015 07:27:59 +0000 (09:27 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 27 Jan 2015 09:02:52 +0000 (10:02 +0100)
commit9469244d869623e8b54d9f3d4d00737e377af273
tree167b650623d866dee15689d8bee6a4e821af31d0
parent95d6eb3b134e1826ed04cc92b224d93de13e281f
drm/atomic: Fix potential use of state after free

The atomic helpers rely on drm_atomic_state_clear() to reset an atomic
state if a retry is needed due to the w/w mutexes. The subsequent calls
to drm_atomic_get_{crtc,plane,...}_state() would then return the stale
pointers in state->{crtc,plane,...}_states.

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