From: Lyude Paul <lyude@redhat.com>
To: dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org,
nouveau@lists.freedesktop.org
Cc: Lyude Paul <lyude@redhat.com>, stable@vger.kernel.org
Subject: [PATCH 3/6] drm/nouveau: Stop reading port->mgr in nv50_mstc_get_modes()
Date: Fri, 16 Nov 2018 19:21:17 -0500 [thread overview]
Message-ID: <20181117002120.28703-4-lyude@redhat.com> (raw)
In-Reply-To: <20181117002120.28703-1-lyude@redhat.com>
mstc->port isn't validated here so it could be null or worse when we
access it. And drivers aren't ever supposed to be looking at it's
contents anyway. Plus, we can already get the MST manager from
&mstc->mstm->mgr.
Signed-off-by: Lyude Paul <lyude@redhat.com>
Cc: stable@vger.kernel.org
---
drivers/gpu/drm/nouveau/dispnv50/disp.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/nouveau/dispnv50/disp.c b/drivers/gpu/drm/nouveau/dispnv50/disp.c
index e6f72ca0b1fa..66c40b56a0cb 100644
--- a/drivers/gpu/drm/nouveau/dispnv50/disp.c
+++ b/drivers/gpu/drm/nouveau/dispnv50/disp.c
@@ -893,7 +893,8 @@ nv50_mstc_get_modes(struct drm_connector *connector)
struct nv50_mstc *mstc = nv50_mstc(connector);
int ret = 0;
- mstc->edid = drm_dp_mst_get_edid(&mstc->connector, mstc->port->mgr, mstc->port);
+ mstc->edid = drm_dp_mst_get_edid(&mstc->connector,
+ &mstc->mstm->mgr, mstc->port);
drm_connector_update_edid_property(&mstc->connector, mstc->edid);
if (mstc->edid)
ret = drm_add_edid_modes(&mstc->connector, mstc->edid);
--
2.19.1
next prev parent reply other threads:[~2018-11-17 0:21 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-17 0:21 [PATCH 0/6] Remove all bad dp_mst_port uses and hide struct def Lyude Paul
2018-11-17 0:21 ` [PATCH 1/6] drm/dp_mst: Add drm_dp_get_payload_info() Lyude Paul
[not found] ` <20181117002120.28703-2-lyude-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2018-11-27 21:23 ` Daniel Vetter
2018-11-27 21:28 ` [Nouveau] " Lyude Paul
[not found] ` <20181117002120.28703-1-lyude-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2018-11-17 0:21 ` [PATCH 2/6] drm/nouveau: Use drm_dp_get_payload_info() for getting payload/vcpi Lyude Paul
2018-11-17 0:21 ` [PATCH 5/6] drm/dp_mst: Hide drm_dp_mst_port contents from drivers Lyude Paul
2018-11-24 15:55 ` [PATCH 0/6] Remove all bad dp_mst_port uses and hide struct def Karol Herbst
2018-11-17 0:21 ` Lyude Paul [this message]
2018-11-17 12:24 ` [PATCH 3/6] drm/nouveau: Stop reading port->mgr in nv50_mstc_get_modes() Sasha Levin
2018-11-17 0:21 ` [PATCH 4/6] drm/nouveau: Stop reading port->mgr in nv50_mstc_detect() Lyude Paul
2018-11-17 12:24 ` Sasha Levin
2018-11-27 18:28 ` Lyude Paul
2018-11-17 0:21 ` [PATCH 6/6] drm/i915: Start using struct drm_dp_mst_port again Lyude Paul
2018-11-17 0:52 ` ✓ Fi.CI.BAT: success for Remove all bad dp_mst_port uses and hide struct def Patchwork
2018-11-17 10:08 ` ✓ Fi.CI.IGT: " Patchwork
2018-11-27 22:17 ` [PATCH 0/6] " Ben Skeggs
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=20181117002120.28703-4-lyude@redhat.com \
--to=lyude@redhat.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=nouveau@lists.freedesktop.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