Patch "drm/atomic: Verify connector->funcs != NULL when clearing states" has been added to the 4.4-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    drm/atomic: Verify connector->funcs != NULL when clearing states

to the 4.4-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     drm-atomic-verify-connector-funcs-null-when-clearing-states.patch
and it can be found in the queue-4.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From cpaul@xxxxxxxxxx  Sat Jun  4 13:44:11 2016
From: Lyude <cpaul@xxxxxxxxxx>
Date: Tue, 31 May 2016 12:49:07 -0400
Subject: drm/atomic: Verify connector->funcs != NULL when clearing states
To: stable@xxxxxxxxxxxxxxx, Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
Cc: Lyude <cpaul@xxxxxxxxxx>, David Airlie <airlied@xxxxxxxx>, dri-devel@xxxxxxxxxxxxxxxxxxxxx (open list:DRM DRIVERS), linux-kernel@xxxxxxxxxxxxxxx (open list)
Message-ID: <1464713347-28982-5-git-send-email-cpaul@xxxxxxxxxx>

From: Lyude <cpaul@xxxxxxxxxx>

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@xxxxxxxx>
Signed-off-by: Lyude <cpaul@xxxxxxxxxx>
---
 drivers/gpu/drm/drm_atomic.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/gpu/drm/drm_atomic.c
+++ b/drivers/gpu/drm/drm_atomic.c
@@ -150,7 +150,7 @@ void drm_atomic_state_default_clear(stru
 	for (i = 0; i < state->num_connector; i++) {
 		struct drm_connector *connector = state->connectors[i];
 
-		if (!connector)
+		if (!connector || !connector->funcs)
 			continue;
 
 		/*


Patches currently in stable-queue which might be from cpaul@xxxxxxxxxx are

queue-4.4/drm-i915-fbdev-fix-num_connector-references-in-intel_fb_initial_config.patch
queue-4.4/drm-fb_helper-fix-references-to-dev-mode_config.num_connector.patch
queue-4.4/drm-atomic-verify-connector-funcs-null-when-clearing-states.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]