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 parent reply other threads:[~2018-11-17 10:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20181117002120.28703-1-lyude@redhat.com>
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
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;
as well as URLs for NNTP newsgroup(s).