public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: <gregkh@linuxfoundation.org>
To: cpaul@redhat.com, airlied@linux.ie, daniel.vetter@ffwll.ch,
	gregkh@linuxfoundation.org
Cc: <stable@vger.kernel.org>, <stable-commits@vger.kernel.org>
Subject: Patch "drm/atomic: Verify connector->funcs != NULL when clearing states" has been added to the 4.6-stable tree
Date: Sat, 04 Jun 2016 14:36:34 -0700	[thread overview]
Message-ID: <146507619463102@kroah.com> (raw)
In-Reply-To: <1464713347-28982-5-git-send-email-cpaul@redhat.com>


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.6-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.6 subdirectory.

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


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

From: Lyude <cpaul@redhat.com>

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 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
@@ -139,7 +139,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@redhat.com are

queue-4.6/drm-i915-fbdev-fix-num_connector-references-in-intel_fb_initial_config.patch
queue-4.6/drm-i915-psr-try-to-program-link-training-times-correctly.patch
queue-4.6/drm-fb_helper-fix-references-to-dev-mode_config.num_connector.patch
queue-4.6/drm-i915-discard-previous-atomic-state-on-resume-if-connectors-change.patch
queue-4.6/drm-atomic-verify-connector-funcs-null-when-clearing-states.patch

  parent reply	other threads:[~2016-06-04 21:36 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-31 16:49 [PATCH 0/4] Important MST fixes for 4.6 Lyude
2016-05-31 16:49 ` [PATCH 1/4] drm/i915/fbdev: Fix num_connector references in intel_fb_initial_config() Lyude
2016-05-31 16:49 ` [PATCH 2/4] drm/fb_helper: Fix references to dev->mode_config.num_connector Lyude
2016-05-31 16:49 ` [PATCH 3/4] drm/i915: Discard previous atomic state on resume if connectors change Lyude
2016-06-04 20:46   ` Greg Kroah-Hartman
2016-06-04 21:36   ` Patch "drm/i915: Discard previous atomic state on resume if connectors change" has been added to the 4.6-stable tree gregkh
2016-05-31 16:49 ` [PATCH 4/4] drm/atomic: Verify connector->funcs != NULL when clearing states Lyude
2016-06-04 20:54   ` Patch "drm/atomic: Verify connector->funcs != NULL when clearing states" has been added to the 4.4-stable tree gregkh
2016-06-04 21:22   ` Patch "drm/atomic: Verify connector->funcs != NULL when clearing states" has been added to the 4.5-stable tree gregkh
2016-06-04 21:36   ` gregkh [this message]
2016-05-31 19:10 ` [Intel-gfx] [PATCH 0/4] Important MST fixes for 4.6 Daniel Vetter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=146507619463102@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=airlied@linux.ie \
    --cc=cpaul@redhat.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=stable-commits@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox