From: Abhinav Kumar <quic_abhinavk@quicinc.com>
To: Haowen Bai <baihaowen@meizu.com>, Rob Clark <robdclark@gmail.com>,
"Dmitry Baryshkov" <dmitry.baryshkov@linaro.org>,
Sean Paul <sean@poorly.run>, "David Airlie" <airlied@linux.ie>,
Daniel Vetter <daniel@ffwll.ch>
Cc: <linux-arm-msm@vger.kernel.org>,
<dri-devel@lists.freedesktop.org>,
<freedreno@lists.freedesktop.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] drm/msm/dpu: Fix pointer dereferenced before checking
Date: Mon, 30 May 2022 17:36:51 -0700 [thread overview]
Message-ID: <68443e94-32fc-a35e-3383-0dcd8ca967c0@quicinc.com> (raw)
In-Reply-To: <1653896005-25168-1-git-send-email-baihaowen@meizu.com>
On 5/30/2022 12:33 AM, Haowen Bai wrote:
> The ctx->hw is dereferencing before null checking, so move
> it after checking.
>
> Signed-off-by: Haowen Bai <baihaowen@meizu.com>
Agree with Dmitry's comment. Adjust the patch subject to a different one
otherwise PW thinks they are same patches.
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
> ---
> drivers/gpu/drm/msm/disp/dpu1/dpu_hw_wb.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_wb.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_wb.c
> index bcccce292937..e59680cdd0ce 100644
> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_wb.c
> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_wb.c
> @@ -155,11 +155,13 @@ static void dpu_hw_wb_roi(struct dpu_hw_wb *ctx, struct dpu_hw_wb_cfg *wb)
> static void dpu_hw_wb_setup_qos_lut(struct dpu_hw_wb *ctx,
> struct dpu_hw_wb_qos_cfg *cfg)
> {
> - struct dpu_hw_blk_reg_map *c = &ctx->hw;
> + struct dpu_hw_blk_reg_map *c;
> u32 qos_ctrl = 0;
>
> if (!ctx || !cfg)
> return;
> +
> + c = &ctx->hw;
>
> DPU_REG_WRITE(c, WB_DANGER_LUT, cfg->danger_lut);
> DPU_REG_WRITE(c, WB_SAFE_LUT, cfg->safe_lut);
next prev parent reply other threads:[~2022-05-31 0:41 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-30 7:33 Haowen Bai
2022-05-30 21:49 ` Dmitry Baryshkov
2022-05-31 0:36 ` Abhinav Kumar [this message]
2022-05-31 1:37 ` baihaowen
2022-05-31 1:34 ` baihaowen
2022-05-31 20:34 ` Rob Clark
-- strict thread matches above, loose matches on Subject: below --
2022-05-30 2:19 Haowen Bai
2022-05-30 21:49 ` Dmitry Baryshkov
2022-05-31 17:51 ` Abhinav Kumar
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=68443e94-32fc-a35e-3383-0dcd8ca967c0@quicinc.com \
--to=quic_abhinavk@quicinc.com \
--cc=airlied@linux.ie \
--cc=baihaowen@meizu.com \
--cc=daniel@ffwll.ch \
--cc=dmitry.baryshkov@linaro.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robdclark@gmail.com \
--cc=sean@poorly.run \
/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®