]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
drm/atomic: Verify connector->funcs != NULL when clearing states
authorLyude <cpaul@redhat.com>
Tue, 31 May 2016 16:49:07 +0000 (12:49 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 Jun 2016 01:14:37 +0000 (18:14 -0700)
commit8453324b7f4968ad2ebd90c9831c05f9801d92c3
tree41cd34c75fe760f635f25b86b36fc7fee18cb9bf
parentc5b424e7fd4204a16a0884c2e544ff14083cd5bd
drm/atomic: Verify connector->funcs != NULL when clearing states

Unfortunately since we don't have Dave's connector refcounting patch
here yet, it's very possible that drm_atomic_state_default_clear() could
get called by intel_display_resume() when
intel_dp_mst_destroy_connector() isn't completely finished destroying an
mst connector, but has already finished setting connector->funcs to
NULL. As such, we need to treat the connector like it's already been
destroyed and just skip it, otherwise we'll end up dereferencing a NULL
pointer.

This fix is only required for 4.6 and below. David Airlie's patchseries
for 4.7 to add connector reference counting provides a more proper fix
for this.

Changes since v1:
 - Fix leftover whitespace

Upstream fix: 0552f7651bc2 ("drm/i915/mst: use reference counted
connectors. (v3)")
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Lyude <cpaul@redhat.com>
drivers/gpu/drm/drm_atomic.c