From: Abhinav Kumar <quic_abhinavk@quicinc.com>
To: Aleksandr Mishin <amishin@t-argos.ru>,
Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Cc: Rob Clark <robdclark@gmail.com>, Sean Paul <sean@poorly.run>,
Marijn Suijten <marijn.suijten@somainline.org>,
David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>,
Neil Armstrong <neil.armstrong@linaro.org>,
Stephen Boyd <swboyd@chromium.org>,
<linux-arm-msm@vger.kernel.org>,
<dri-devel@lists.freedesktop.org>,
<freedreno@lists.freedesktop.org>, <linux-kernel@vger.kernel.org>,
<lvc-project@linuxtesting.org>
Subject: Re: [PATCH] drm/msm/dpu: Add callback function pointer check before its call
Date: Mon, 8 Apr 2024 09:51:43 -0700 [thread overview]
Message-ID: <c2c3b573-0e62-4452-e657-fbef9abb9430@quicinc.com> (raw)
In-Reply-To: <20240408085523.12231-1-amishin@t-argos.ru>
On 4/8/2024 1:55 AM, Aleksandr Mishin wrote:
> In dpu_core_irq_callback_handler() callback function pointer is compared to NULL,
> but then callback function is unconditionally called by this pointer.
> Fix this bug by adding conditional return.
>
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
>
Yes , as dmitry wrote, this should be Reported-by.
But rest LGTM.
> Fixes: c929ac60b3ed ("drm/msm/dpu: allow just single IRQ callback")
> Signed-off-by: Aleksandr Mishin <amishin@t-argos.ru>
> ---
> drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c
> index 946dd0135dff..03a16fbd4c99 100644
> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c
> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c
> @@ -223,9 +223,11 @@ static void dpu_core_irq_callback_handler(struct dpu_kms *dpu_kms, unsigned int
>
> VERB("IRQ=[%d, %d]\n", DPU_IRQ_REG(irq_idx), DPU_IRQ_BIT(irq_idx));
>
> - if (!irq_entry->cb)
> + if (!irq_entry->cb) {
> DRM_ERROR("no registered cb, IRQ=[%d, %d]\n",
> DPU_IRQ_REG(irq_idx), DPU_IRQ_BIT(irq_idx));
> + return;
> + }
>
> atomic_inc(&irq_entry->count);
>
next prev parent reply other threads:[~2024-04-08 16:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-08 8:55 Aleksandr Mishin
2024-04-08 9:03 ` Dmitry Baryshkov
2024-04-10 11:48 ` Aleksandr Mishin
2024-04-10 13:17 ` Dmitry Baryshkov
2024-04-08 16:51 ` Abhinav Kumar [this message]
2024-04-10 11:45 ` Aleksandr Mishin
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=c2c3b573-0e62-4452-e657-fbef9abb9430@quicinc.com \
--to=quic_abhinavk@quicinc.com \
--cc=airlied@gmail.com \
--cc=amishin@t-argos.ru \
--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=lvc-project@linuxtesting.org \
--cc=marijn.suijten@somainline.org \
--cc=neil.armstrong@linaro.org \
--cc=robdclark@gmail.com \
--cc=sean@poorly.run \
--cc=swboyd@chromium.org \
/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®