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>,
<freedreno@lists.freedesktop.org>, <linux-kernel@vger.kernel.org>,
<dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH] drm/msm/dpu: Fix pointer dereferenced before checking
Date: Tue, 31 May 2022 10:51:55 -0700 [thread overview]
Message-ID: <73f2e94b-daa5-b30e-4fa9-f6725ed1a686@quicinc.com> (raw)
In-Reply-To: <1653877196-23114-1-git-send-email-baihaowen@meizu.com>
On 5/29/2022 7:19 PM, Haowen Bai wrote:
> The phys_enc->wb_idx is dereferencing before null checking, so move
> it after checking.
>
> Signed-off-by: Haowen Bai <baihaowen@meizu.com>
Fixes: d7d0e73f7de33 ("drm/msm/dpu: introduce the dpu_encoder_phys_* for
writeback")
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
> ---
> drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_wb.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_wb.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_wb.c
> index 4829d1ce0cf8..59da348ff339 100644
> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_wb.c
> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_wb.c
> @@ -574,11 +574,11 @@ static void dpu_encoder_phys_wb_disable(struct dpu_encoder_phys *phys_enc)
> */
> static void dpu_encoder_phys_wb_destroy(struct dpu_encoder_phys *phys_enc)
> {
> - DPU_DEBUG("[wb:%d]\n", phys_enc->wb_idx - WB_0);
> -
> if (!phys_enc)
> return;
>
> + DPU_DEBUG("[wb:%d]\n", phys_enc->wb_idx - WB_0);
> +
> kfree(phys_enc);
> }
>
next prev parent reply other threads:[~2022-05-31 17:52 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-30 2:19 Haowen Bai
2022-05-30 21:49 ` Dmitry Baryshkov
2022-05-31 17:51 ` Abhinav Kumar [this message]
2022-05-30 7:33 Haowen Bai
2022-05-30 21:49 ` Dmitry Baryshkov
2022-05-31 0:36 ` Abhinav Kumar
2022-05-31 1:37 ` baihaowen
2022-05-31 1:34 ` baihaowen
2022-05-31 20:34 ` Rob Clark
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=73f2e94b-daa5-b30e-4fa9-f6725ed1a686@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®