From: "Chung, ChiaHsuan (Tom)" <chiahsuan.chung@amd.com>
To: Zicheng Qu <quzicheng@huawei.com>,
harry.wentland@amd.com, sunpeng.li@amd.com,
Rodrigo.Siqueira@amd.com, alexander.deucher@amd.com,
christian.koenig@amd.com, Xinhui.Pan@amd.com, airlied@gmail.com,
simona@ffwll.ch, Dillon.Varone@amd.com, Alvin.Lee2@amd.com,
nicholas.kazlauskas@amd.com, alex.hung@amd.com,
aurabindo.pillai@amd.com, relja.vojvodic@amd.com,
wenjing.liu@amd.com, george.shen@amd.com, mwen@igalia.com,
yi-lchen@amd.com, martin.leung@amd.com,
srinivasan.shanmugam@amd.com, stylon.wang@amd.com,
jun.lei@amd.com, amd-gfx@lists.freedesktop.org,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Cc: tanghui20@huawei.com, zhangqiao22@huawei.com, judy.chenhui@huawei.com
Subject: Re: [PATCH 2/2] drm/amd/display: Fix null check for pipe_ctx->plane_state in hwss_setup_dpp
Date: Thu, 14 Nov 2024 16:16:05 +0800 [thread overview]
Message-ID: <93788edc-541e-4f7e-afe1-02a2526be684@amd.com> (raw)
In-Reply-To: <20241105140137.2465572-3-quzicheng@huawei.com>
Reviewed-by: Tom Chung <chiahsuan.chung@amd.com>
On 11/5/2024 10:01 PM, Zicheng Qu wrote:
> This commit addresses a null pointer dereference issue in
> hwss_setup_dpp(). The issue could occur when pipe_ctx->plane_state is
> null. The fix adds a check to ensure `pipe_ctx->plane_state` is not null
> before accessing. This prevents a null pointer dereference.
>
> Fixes: 0baae6246307 ("drm/amd/display: Refactor fast update to use new HWSS build sequence")
> Signed-off-by: Zicheng Qu <quzicheng@huawei.com>
> ---
> drivers/gpu/drm/amd/display/dc/core/dc_hw_sequencer.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_hw_sequencer.c b/drivers/gpu/drm/amd/display/dc/core/dc_hw_sequencer.c
> index 7ee2be8f82c4..bb766c2a7417 100644
> --- a/drivers/gpu/drm/amd/display/dc/core/dc_hw_sequencer.c
> +++ b/drivers/gpu/drm/amd/display/dc/core/dc_hw_sequencer.c
> @@ -881,6 +881,9 @@ void hwss_setup_dpp(union block_sequence_params *params)
> struct dpp *dpp = pipe_ctx->plane_res.dpp;
> struct dc_plane_state *plane_state = pipe_ctx->plane_state;
>
> + if (!plane_state)
> + return;
> +
> if (dpp && dpp->funcs->dpp_setup) {
> // program the input csc
> dpp->funcs->dpp_setup(dpp,
next prev parent reply other threads:[~2024-11-14 8:16 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-05 14:01 [PATCH 0/2] drm/amd/display: Fix Null Pointer Dereference Issues Zicheng Qu
2024-11-05 14:01 ` [PATCH 1/2] drm/amd/display: Fix null check for pipe_ctx->plane_state in dcn20_program_pipe Zicheng Qu
2024-11-14 8:20 ` Chung, ChiaHsuan (Tom)
2024-11-05 14:01 ` [PATCH 2/2] drm/amd/display: Fix null check for pipe_ctx->plane_state in hwss_setup_dpp Zicheng Qu
2024-11-14 8:16 ` Chung, ChiaHsuan (Tom) [this message]
2024-11-18 17:12 ` Alex Deucher
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=93788edc-541e-4f7e-afe1-02a2526be684@amd.com \
--to=chiahsuan.chung@amd.com \
--cc=Alvin.Lee2@amd.com \
--cc=Dillon.Varone@amd.com \
--cc=Rodrigo.Siqueira@amd.com \
--cc=Xinhui.Pan@amd.com \
--cc=airlied@gmail.com \
--cc=alex.hung@amd.com \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=aurabindo.pillai@amd.com \
--cc=christian.koenig@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=george.shen@amd.com \
--cc=harry.wentland@amd.com \
--cc=judy.chenhui@huawei.com \
--cc=jun.lei@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=martin.leung@amd.com \
--cc=mwen@igalia.com \
--cc=nicholas.kazlauskas@amd.com \
--cc=quzicheng@huawei.com \
--cc=relja.vojvodic@amd.com \
--cc=simona@ffwll.ch \
--cc=srinivasan.shanmugam@amd.com \
--cc=stylon.wang@amd.com \
--cc=sunpeng.li@amd.com \
--cc=tanghui20@huawei.com \
--cc=wenjing.liu@amd.com \
--cc=yi-lchen@amd.com \
--cc=zhangqiao22@huawei.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
all inboxes | Powered by JetHome®