From: Nicolas Dufresne <nicolas.dufresne@collabora.com>
To: Anastasia Belova <abelova@astralinux.ru>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Matthias Brugger <matthias.bgg@gmail.com>
Cc: Tiffany Lin <tiffany.lin@mediatek.com>,
Andrew-CT Chen <andrew-ct.chen@mediatek.com>,
Yunfei Dong <yunfei.dong@mediatek.com>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>,
Hans Verkuil <hverkuil-cisco@xs4all.nl>,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org, lvc-project@linuxtesting.org
Subject: Re: [PATCH v2] vcodec: mediatek: add check for NULL for
Date: Thu, 03 Nov 2022 12:17:17 -0400 [thread overview]
Message-ID: <df2676f0e4dce565d483ce2149b2c54da05b34a5.camel@collabora.com> (raw)
In-Reply-To: <20221102121027.4285-1-abelova@astralinux.ru>
Le mercredi 02 novembre 2022 à 15:10 +0300, Anastasia Belova a écrit :
> Any time calling vp9_is_sf_ref_fb we need fb != NULL after checks.
>
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
>
> Fixes: f77e89854b3e ("[media] vcodec: mediatek: Add Mediatek VP9 Video Decoder Driver")
As Angelo said, this change is a no-op in practice, for this reason I would
suggest to drop the `Fixes` tag (not worth the effort of back-porting this).
>
> Signed-off-by: Anastasia Belova <abelova@astralinux.ru>
Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
> ---
> drivers/media/platform/mediatek/vcodec/vdec/vdec_vp9_if.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/media/platform/mediatek/vcodec/vdec/vdec_vp9_if.c b/drivers/media/platform/mediatek/vcodec/vdec/vdec_vp9_if.c
> index 70b8383f7c8e..776468cd834a 100644
> --- a/drivers/media/platform/mediatek/vcodec/vdec/vdec_vp9_if.c
> +++ b/drivers/media/platform/mediatek/vcodec/vdec/vdec_vp9_if.c
> @@ -208,6 +208,9 @@ static bool vp9_is_sf_ref_fb(struct vdec_vp9_inst *inst, struct vdec_fb *fb)
> int i;
> struct vdec_vp9_vsi *vsi = inst->vsi;
>
> + if (!fb)
> + return true;
> +
> for (i = 0; i < ARRAY_SIZE(vsi->sf_ref_fb); i++) {
> if (fb == &vsi->sf_ref_fb[i].fb)
> return true;
next prev parent reply other threads:[~2022-11-03 16:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-02 12:10 Anastasia Belova
2022-11-03 16:17 ` Nicolas Dufresne [this message]
2022-11-04 9:05 ` AngeloGioacchino Del Regno
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=df2676f0e4dce565d483ce2149b2c54da05b34a5.camel@collabora.com \
--to=nicolas.dufresne@collabora.com \
--cc=abelova@astralinux.ru \
--cc=andrew-ct.chen@mediatek.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=hverkuil-cisco@xs4all.nl \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=lvc-project@linuxtesting.org \
--cc=matthias.bgg@gmail.com \
--cc=mchehab@kernel.org \
--cc=tiffany.lin@mediatek.com \
--cc=yunfei.dong@mediatek.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®