Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp4023126rwr; Sat, 22 Apr 2023 18:29:28 -0700 (PDT) X-Google-Smtp-Source: AKy350b+V+TysENSzov4H/8vtDdnJEikhpG1gv874kG5KE80+0Zjn2ZYsk2ilGQhzjM5UbI23S5r X-Received: by 2002:a17:902:d4c2:b0:1a9:6467:aa8d with SMTP id o2-20020a170902d4c200b001a96467aa8dmr2781318plg.1.1682213368045; Sat, 22 Apr 2023 18:29:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682213368; cv=none; d=google.com; s=arc-20160816; b=U0bJSBepR4SXUlMujtMja4ln3sVaS1TWQUb2gel7p/ayvderpvljYt5xAywvNr4T1X f+tyf1hrAGS3/hwiAJoaMx083L5gDsuvtUHDUdrK2RICsDoeZUBvxx5CxUXOIlXAhTo5 mYhySR7+jE3qfGZGdApAiypcxeAmnqzE47kSH7G8QgQNPx30dlYyOmFTDBeszjtnqU13 lRcBTRidcN+8xsn6ZxaAg252Bw9GUJdYUdvl94eR4ZsIZafUoUc0jWcgK8SdS2odmSO4 7RMt/EYe3EOfdVjr/i6wrCIj4k+iNyF4TEOQ7SB9gCv3K+WsDr/rI+Jh/VgPZVD9BiBo dFVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id:dkim-signature; bh=WeNp6FPRjc2ZFDYBgn3Tu5xf/IXCM35V0WT99wHpKSU=; b=NjOOQrIDHKakPK96TPuGXE98mvGFRXH4eZ1lz0c8IlIxdHnzGywIOUSytdiYcV5CsX wgH6ZSnitAqYRkkEHx3y+58u503C7BkKcDP3BpzdzhYX0198KB4ZOmV2O/+un/0XI1KU dEWj5SqZ33R8wYpeVfC2HhlHGJXhbDv0aWW+V0uN0IdYePPT0hZnekZuutr869jacRZ2 UTQzx3jbNPvhu+VKHSwvFh/DdEIHMqejmNULzK4YbL32fsHhyi4qYWSPE30WaVDX3U+0 SLRnzyEyiNHAeqtNpY20KJVfkSZ4KLTIm4rH/jFXoyHYcRXKfiZhE9f2Y5fAmhN1j9tR CxUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=N8LfNmHh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b18-20020a170903229200b001a1bf377c3csi8992841plh.598.2023.04.22.18.29.17; Sat, 22 Apr 2023 18:29:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=N8LfNmHh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229933AbjDWAfA (ORCPT + 99 others); Sat, 22 Apr 2023 20:35:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53328 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229580AbjDWAe7 (ORCPT ); Sat, 22 Apr 2023 20:34:59 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 48702211E for ; Sat, 22 Apr 2023 17:34:58 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id D397261461 for ; Sun, 23 Apr 2023 00:34:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 611E7C433D2; Sun, 23 Apr 2023 00:34:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1682210097; bh=JNSlUkMUb/vTZyPvFPK9GDKgh29Sk76KROilX21N1bY=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=N8LfNmHhurMgegU++0cdfW0n9sl4pIgFJCEbK5J8QG5KYJDfHRup03GgvqtCqsVYt uM4+5Nd67bNhprWPpCHs6RBLEFIJ9murSI53svGg+je+LzOHvwj7yJmn8smFOgcIvv NY+bQad5oRgKwomjbeEr7dMqtdx9qaiTg+DJY1lTRhvifNoiu42unWvTEDMMMLqSfV v1ZL1Z0Q3b5yRfaNXLg793YVQWZjCrRDbezSsxtDpm7gYe8LNua91bhyHudu0XtXds MCKS5GwNA+iP+fIXZ0uqoHTqcQ5krbahT5k2jrM4bfGfqlIiZENnva9Hlqhep4KDx+ UdB/dtpcTvMUA== Message-ID: <04cc52e7458cbd22c0ef9d092aabca3ea5403074.camel@kernel.org> Subject: Re: [PATCH v2] drm: use mgr->dev in drm_dbg_kms in drm_dp_add_payload_part2 From: Jeff Layton To: Jani Nikula , David Airlie , Daniel Vetter Cc: Wayne.Lin@amd.com, lyude@redhat.com, alexdeucher@gmail.com, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Date: Sat, 22 Apr 2023 20:34:55 -0400 In-Reply-To: <87o7nkypmo.fsf@intel.com> References: <20230419112447.18471-1-jlayton@kernel.org> <87o7nkypmo.fsf@intel.com> Content-Type: text/plain; charset="ISO-8859-15" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.48.0 (3.48.0-1.fc38) MIME-Version: 1.0 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2023-04-19 at 16:21 +0300, Jani Nikula wrote: > On Wed, 19 Apr 2023, Jeff Layton wrote: > > I've been experiencing some intermittent crashes down in the display > > driver code. The symptoms are ususally a line like this in dmesg: > >=20 > > amdgpu 0000:30:00.0: [drm] Failed to create MST payload for port 00= 0000006d3a3885: -5 > >=20 > > ...followed by an Oops due to a NULL pointer dereference. > >=20 > > Switch to using mgr->dev instead of state->dev since "state" can be > > NULL in some cases. > >=20 > > Link: https://bugzilla.redhat.com/show_bug.cgi?id=3D2184855 > > Suggested-by: Jani Nikula > > Signed-off-by: Jeff Layton >=20 > Thanks, >=20 > Reviewed-by: Jani Nikula >=20 > > > --- > > drivers/gpu/drm/display/drm_dp_mst_topology.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > >=20 > > I've been running this patch for a couple of days, but the problem > > hasn't occurred again as of yet. It seems sane though as long as we can > > assume that mgr->dev will be valid even when "state" is a NULL pointer. > >=20 > > diff --git a/drivers/gpu/drm/display/drm_dp_mst_topology.c b/drivers/gp= u/drm/display/drm_dp_mst_topology.c > > index 38dab76ae69e..e2e21ce79510 100644 > > --- a/drivers/gpu/drm/display/drm_dp_mst_topology.c > > +++ b/drivers/gpu/drm/display/drm_dp_mst_topology.c > > @@ -3404,7 +3404,7 @@ int drm_dp_add_payload_part2(struct drm_dp_mst_to= pology_mgr *mgr, > > =20 > > /* Skip failed payloads */ > > if (payload->vc_start_slot =3D=3D -1) { > > - drm_dbg_kms(state->dev, "Part 1 of payload creation for %s failed, s= kipping part 2\n", > > + drm_dbg_kms(mgr->dev, "Part 1 of payload creation for %s failed, ski= pping part 2\n", > > payload->port->connector->name); > > return -EIO; > > } >=20 Thanks for the reviews! I finally had this happen again today, and I can confirm that this does prevent the oops. GNOME rearranged my screen layout after the error, but the box stayed up and running.=20 --=20 Jeff Layton