From: Aleksandr Mishin <amishin@t-argos.ru>
To: Abhinav Kumar <quic_abhinavk@quicinc.com>,
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: Wed, 10 Apr 2024 14:45:13 +0300 [thread overview]
Message-ID: <6151dd67-702b-41e7-8e54-43d4d1178442@t-argos.ru> (raw)
In-Reply-To: <c2c3b573-0e62-4452-e657-fbef9abb9430@quicinc.com>
On 08.04.2024 19:51, Abhinav Kumar wrote:
>
>
> 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.
>
It is an established practice for our project, you can find 700+ applied
patches with similar line:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/log/?qt=grep&q=linuxtesting.org
> 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);
--
Kind regards
Aleksandr
prev parent reply other threads:[~2024-04-10 11:49 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
2024-04-10 11:45 ` Aleksandr Mishin [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=6151dd67-702b-41e7-8e54-43d4d1178442@t-argos.ru \
--to=amishin@t-argos.ru \
--cc=airlied@gmail.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=lvc-project@linuxtesting.org \
--cc=marijn.suijten@somainline.org \
--cc=neil.armstrong@linaro.org \
--cc=quic_abhinavk@quicinc.com \
--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®