public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jeff Layton <jlayton@kernel.org>
To: Jani Nikula <jani.nikula@linux.intel.com>,
	David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>
Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
	Harry Wentland <harry.wentland@amd.com>,
	Alex Deucher <alexander.deucher@amd.com>
Subject: Re: [PATCH] drm: make drm_dp_add_payload_part2 gracefully handle NULL state pointer
Date: Thu, 13 Apr 2023 08:43:52 -0400	[thread overview]
Message-ID: <cc3ceecef10fabf6856e29c2dd22b040b3ea757b.camel@kernel.org> (raw)
In-Reply-To: <87edooarpq.fsf@intel.com>

On Thu, 2023-04-13 at 15:31 +0300, Jani Nikula wrote:
> On Thu, 13 Apr 2023, Jeff Layton <jlayton@kernel.org> wrote:
> > I've been experiencing some intermittent crashes down in the display
> > driver code. The symptoms are ususally a line like this in dmesg:
> > 
> >     amdgpu 0000:30:00.0: [drm] Failed to create MST payload for port 000000006d3a3885: -5
> > 
> > ...followed by an Oops due to a NULL pointer dereference.
> > 
> > The real bug is probably in the caller of this function, which is
> > passing it a NULL state pointer, but this patch at least keeps my
> > machine from oopsing when this occurs.
> 
> My fear is that papering over this makes the root cause harder to find.
> 
> Cc: Harry, Alex
> 
> 
> BR,
> Jani.
> 
> 

I'm happy to help track down the root cause. Display drivers are
somewhat outside my wheelhouse though.

Maybe we can throw a WARNING when this happens? I'd just like it to not
crash my machine.


> > 
> > Link: https://bugzilla.redhat.com/show_bug.cgi?id=2184855
> > Signed-off-by: Jeff Layton <jlayton@kernel.org>
> > ---
> >  drivers/gpu/drm/display/drm_dp_mst_topology.c | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/gpu/drm/display/drm_dp_mst_topology.c b/drivers/gpu/drm/display/drm_dp_mst_topology.c
> > index 38dab76ae69e..87ad406c50f9 100644
> > --- a/drivers/gpu/drm/display/drm_dp_mst_topology.c
> > +++ b/drivers/gpu/drm/display/drm_dp_mst_topology.c
> > @@ -3404,7 +3404,8 @@ int drm_dp_add_payload_part2(struct drm_dp_mst_topology_mgr *mgr,
> >  
> >  	/* Skip failed payloads */
> >  	if (payload->vc_start_slot == -1) {
> > -		drm_dbg_kms(state->dev, "Part 1 of payload creation for %s failed, skipping part 2\n",
> > +		drm_dbg_kms(state ? state->dev : NULL,
> > +			    "Part 1 of payload creation for %s failed, skipping part 2\n",
> >  			    payload->port->connector->name);
> >  		return -EIO;
> >  	}
> 

-- 
Jeff Layton <jlayton@kernel.org>

  reply	other threads:[~2023-04-13 12:43 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-13 11:12 [PATCH] drm: make drm_dp_add_payload_part2 gracefully handle NULL state pointer Jeff Layton
2023-04-13 12:31 ` Jani Nikula
2023-04-13 12:43   ` Jeff Layton [this message]
2023-04-13 12:58   ` Alex Deucher
2023-04-14  4:40     ` Lin, Wayne
2023-04-14 10:15       ` Jeff Layton
2023-04-14 10:35         ` Jani Nikula
2023-04-14 22:51           ` Lyude Paul
2023-04-17  8:44             ` Jani Nikula
2023-04-17 10:06               ` Jeff Layton
2023-04-17 10:29                 ` Jani Nikula
2023-04-17 10:58                   ` Lin, Wayne
2023-04-17 11:13                     ` Jeff Layton
2023-04-17 11:02                   ` Jeff Layton

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=cc3ceecef10fabf6856e29c2dd22b040b3ea757b.camel@kernel.org \
    --to=jlayton@kernel.org \
    --cc=airlied@gmail.com \
    --cc=alexander.deucher@amd.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=harry.wentland@amd.com \
    --cc=jani.nikula@linux.intel.com \
    --cc=linux-kernel@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