Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp124282rwr; Wed, 19 Apr 2023 04:28:45 -0700 (PDT) X-Google-Smtp-Source: AKy350bNC07OxwUjX07zHP12ZDv4D0+aXXhci0p9EEz0AScCbBlbjVqhtrEIxtN5sIVzXlUQoWme X-Received: by 2002:a17:902:ea0e:b0:1a1:ee8c:eef5 with SMTP id s14-20020a170902ea0e00b001a1ee8ceef5mr6033334plg.7.1681903724893; Wed, 19 Apr 2023 04:28:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681903724; cv=none; d=google.com; s=arc-20160816; b=P5jSSY5AnEUJ4uQhxJz3WbwkMpXb31Onj12TCnJX+4Dzr0bNYZn7WMJuy3nneZa+Rf GiTL63WWeJa8mby6oN2xrjDRhm23f9lYdc4eAktC9iysn5UkzDafUQfLkeSZYSXRoHvs /fIGaBEjw3+tGkwodNpfGuNCP9XZeTFAPzgxkglal3eAL9/u4+XVbX7wxg1eqtwcjMjI ZC9TKDeVuT4VJaTQE1gkQUs6Z0Ks0lG+NNXccWNLk5FobQWIbj7eO+u0rKc+WxdbNHxg ovMYheLT9gTAhfEUe1bpnquY0a6A5WfrS4B7bCJrvmLLJPra+qpWgg0kXQTCui+W6hBS t3oA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=Kn5ICyWKwtfPjGnv22m3wnaRu06s+EH26GnX66SjND4=; b=gZqwB6YnN3xAcqHf/k24YnPn8/33mh1lCEjdYjHLAstxqkEBitntTwr8UdRoXB5KB4 AlGRZPj9GlhI3rqofWUHlxOZcyQvCKdtSgMxBC8EiSOxzNQGwiMY6aB1VB+FnTSJu5YL nkK0IdZZVvFsrfR5WYitDvePFBKCdmlOF3UXZ8KMttIJNXQIufVzLKIn1BoRTGM3kxD9 e0/8WBzHKmw5yU7gW4/ryAEF72TzlmZOI0nCGxBOR2tX8aEqlCenptF9NDHHfGCnVax8 Kfc8Ao0+0+uEcabz56d9AlV8l0MSvQn8bxyriFuOk1XsQX2ZHnnHyYf1nHwCKPHnCaUX vZRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=iWQ76DyF; 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 j3-20020a170903028300b0019cbce63a6esi15157134plr.553.2023.04.19.04.28.30; Wed, 19 Apr 2023 04:28:44 -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=iWQ76DyF; 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 S232607AbjDSLZH (ORCPT + 99 others); Wed, 19 Apr 2023 07:25:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55854 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232711AbjDSLZB (ORCPT ); Wed, 19 Apr 2023 07:25:01 -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 75EA07A9B for ; Wed, 19 Apr 2023 04:24:50 -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 06CA661524 for ; Wed, 19 Apr 2023 11:24:50 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9FC3AC433EF; Wed, 19 Apr 2023 11:24:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1681903489; bh=PanmDTu5lRIgSn8GKJ9uoLf6Evo6osxCZ4efcHlSt3U=; h=From:To:Cc:Subject:Date:From; b=iWQ76DyFPVUXh4v11hmPber04xI849i4omW2/7EpTyHlfQDeFGzMNdfmt/ptO7kEL Uj9fIK7xlz6KlyMtCZstTGAlwRevPS5u8I2hHOsbzqk6F1kIhcKYdcTlGY5bGwF6T/ udu4HtrAfP/zvSChXI+Y4wOJ+6HPJDr0L32KI+1AfW2mspcd+mqXM0cQgyIaWEVCcF JODgl1mC7L1n3tsOOOG9mTMwukBNITvN7ANRt3v8hI9dhTFeidy2nYOOKjYBevJzHH WPoFWj41GmJQdCTm5w+jN8IBCbM7NFwqL51yEahYRBtJSm4zE5NvL4+XDU9YtanTWI FlKc3OmIggNRw== From: Jeff Layton To: David Airlie , Daniel Vetter Cc: Wayne.Lin@amd.com, lyude@redhat.com, alexdeucher@gmail.com, Jani Nikula , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH v2] drm: use mgr->dev in drm_dbg_kms in drm_dp_add_payload_part2 Date: Wed, 19 Apr 2023 07:24:46 -0400 Message-Id: <20230419112447.18471-1-jlayton@kernel.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 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. Switch to using mgr->dev instead of state->dev since "state" can be NULL in some cases. Link: https://bugzilla.redhat.com/show_bug.cgi?id=2184855 Suggested-by: Jani Nikula Signed-off-by: Jeff Layton --- drivers/gpu/drm/display/drm_dp_mst_topology.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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. diff --git a/drivers/gpu/drm/display/drm_dp_mst_topology.c b/drivers/gpu/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_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(mgr->dev, "Part 1 of payload creation for %s failed, skipping part 2\n", payload->port->connector->name); return -EIO; } -- 2.39.2