From: Vinod Koul <vkoul@kernel.org>
To: Anastasia Belova <abelova@astralinux.ru>
Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org,
lvc-project@linuxtesting.org
Subject: Re: [PATCH] vdec_vp9_if: add check for NULL for vsi->frm_bufs[vsi->new_fb_idx].buf.fb in vp9_swap_frm_bufs
Date: Fri, 4 Nov 2022 18:11:22 +0530 [thread overview]
Message-ID: <Y2UIcjjpxDIDDQQm@matsya> (raw)
In-Reply-To: <20221028092516.19070-1-abelova@astralinux.ru>
On 28-10-22, 12:25, Anastasia Belova wrote:
> If vsi->frm_bufs[vsi->new_fb_idx].buf.fb == NULL while cleaning
> fb_free_list NULL-pointer is dereferenced.
Clearly you have incorrect maintainer and list, pls fix and send to
relevant ppl
>
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
>
> Signed-off-by: Anastasia Belova <abelova@astralinux.ru>
> ---
> drivers/media/platform/mtk-vcodec/vdec/vdec_vp9_if.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/media/platform/mtk-vcodec/vdec/vdec_vp9_if.c b/drivers/media/platform/mtk-vcodec/vdec/vdec_vp9_if.c
> index d9880210b2ab..dea056689b48 100644
> --- a/drivers/media/platform/mtk-vcodec/vdec/vdec_vp9_if.c
> +++ b/drivers/media/platform/mtk-vcodec/vdec/vdec_vp9_if.c
> @@ -512,7 +512,7 @@ static void vp9_swap_frm_bufs(struct vdec_vp9_inst *inst)
> * clean fb_free_list
> */
> if (vsi->frm_bufs[vsi->new_fb_idx].ref_cnt == 0) {
> - if (!vp9_is_sf_ref_fb(
> + if (vsi->frm_bufs[vsi->new_fb_idx].buf.fb != NULL && !vp9_is_sf_ref_fb(
> inst, vsi->frm_bufs[vsi->new_fb_idx].buf.fb)) {
> struct vdec_fb *fb;
>
> --
> 2.30.2
--
~Vinod
prev parent reply other threads:[~2022-11-04 12:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-28 9:25 [PATCH] vdec_vp9_if: add check for NULL for vsi->frm_bufs[vsi->new_fb_idx].buf.fb in vp9_swap_frm_bufs Anastasia Belova
2022-11-04 12:41 ` Vinod Koul [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=Y2UIcjjpxDIDDQQm@matsya \
--to=vkoul@kernel.org \
--cc=abelova@astralinux.ru \
--cc=dmaengine@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lvc-project@linuxtesting.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.