Message ID | 20181117002120.28703-4-lyude@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Remove all bad dp_mst_port uses and hide struct def | expand |
Hi, [This is an automated email] This commit has been processed because it contains a -stable tag. The stable tag indicates that it's relevant for the following trees: all The bot has tested the following trees: v4.19.2, v4.18.19, v4.14.81, v4.9.137, v4.4.163, v3.18.125, v4.19.2: Build OK! v4.18.19: Failed to apply! Possible dependencies: Unable to calculate v4.14.81: Failed to apply! Possible dependencies: Unable to calculate v4.9.137: Failed to apply! Possible dependencies: f479c0ba4a17 ("drm/nouveau/kms/nv50: initial support for DP 1.2 multi-stream") v4.4.163: Failed to apply! Possible dependencies: f479c0ba4a17 ("drm/nouveau/kms/nv50: initial support for DP 1.2 multi-stream") v3.18.125: Failed to apply! Possible dependencies: f479c0ba4a17 ("drm/nouveau/kms/nv50: initial support for DP 1.2 multi-stream") How should we proceed with this patch? -- Thanks, Sasha
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);
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(-)