From: Harry Wentland <harry.wentland@amd.com>
To: Aurabindo Pillai <aurabindo.pillai@amd.com>,
amd-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/amd/display: fix null pointer deref when plugging in display
Date: Tue, 12 Oct 2021 10:34:51 -0400 [thread overview]
Message-ID: <9149508b-9203-e5c5-373a-4ddbf5aefbc7@amd.com> (raw)
In-Reply-To: <20211012132642.246950-1-aurabindo.pillai@amd.com>
On 2021-10-12 09:26, Aurabindo Pillai wrote:
> [Why&How]
> When system boots in headless mode, connecting a 4k display creates a
> null pointer dereference due to hubp for a certain plane being null.
> Add a condition to check for null hubp before dereferencing it.
>
> Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Harry
> ---
> drivers/gpu/drm/amd/display/dc/dcn30/dcn30_hwseq.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_hwseq.c b/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_hwseq.c
> index 01a90badd173..2936a334cd64 100644
> --- a/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_hwseq.c
> +++ b/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_hwseq.c
> @@ -969,7 +969,8 @@ void dcn30_set_disp_pattern_generator(const struct dc *dc,
> /* turning off DPG */
> pipe_ctx->plane_res.hubp->funcs->set_blank(pipe_ctx->plane_res.hubp, false);
> for (mpcc_pipe = pipe_ctx->bottom_pipe; mpcc_pipe; mpcc_pipe = mpcc_pipe->bottom_pipe)
> - mpcc_pipe->plane_res.hubp->funcs->set_blank(mpcc_pipe->plane_res.hubp, false);
> + if (mpcc_pipe->plane_res.hubp)
> + mpcc_pipe->plane_res.hubp->funcs->set_blank(mpcc_pipe->plane_res.hubp, false);
>
> stream_res->opp->funcs->opp_set_disp_pattern_generator(stream_res->opp, test_pattern, color_space,
> color_depth, solid_color, width, height, offset);
>
prev parent reply other threads:[~2021-10-12 14:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-12 13:26 [PATCH] drm/amd/display: fix null pointer deref when plugging in display Aurabindo Pillai
2021-10-12 14:34 ` Harry Wentland [this message]
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=9149508b-9203-e5c5-373a-4ddbf5aefbc7@amd.com \
--to=harry.wentland@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=aurabindo.pillai@amd.com \
/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