lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <578640e2f3a51decb61bf769dcd4d28d179cdd88.camel@mediatek.com>
Date:   Tue, 3 Oct 2023 02:14:49 +0000
From:   Moudy Ho (何宗原) <Moudy.Ho@...iatek.com>
To:     "matthias.bgg@...il.com" <matthias.bgg@...il.com>,
        "mchehab@...nel.org" <mchehab@...nel.org>,
        Ping-Hsun Wu (吳秉勳) 
        <Ping-hsun.Wu@...iatek.com>,
        "angelogioacchino.delregno@...labora.com" 
        <angelogioacchino.delregno@...labora.com>,
        "hverkuil-cisco@...all.nl" <hverkuil-cisco@...all.nl>,
        Daoyuan Huang (黃道原) 
        <Daoyuan.Huang@...iatek.com>
CC:     "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-media@...r.kernel.org" <linux-media@...r.kernel.org>,
        "linux-mediatek@...ts.infradead.org" 
        <linux-mediatek@...ts.infradead.org>
Subject: Re: [PATCH v6 13/13] media: platform: mtk-mdp3: fix uninitialized
 variable in mdp_path_config()

On Mon, 2023-10-02 at 12:57 +0200, Hans Verkuil wrote:
>  	 
> External email : Please do not click links or open attachments until
> you have verified the sender or the content.
>  On 22/09/2023 09:41, Moudy Ho wrote:
> > Fix the build warnings that were detected by the linux-media
> > build scripts tool:
> > 
> > drivers/media/platform/mediatek/mdp3/mtk-mdp3-cmdq.c:
> > In function 'mdp_path_config.isra':
> > drivers/media/platform/mediatek/mdp3/mtk-mdp3-cmdq.c:443:51:
> > warning: 'ctx' may be used uninitialized [-Wmaybe-uninitialized]
> >   443 |                    out = CFG_COMP(MT8195, ctx->param,
> outputs[0]);
> >       |                                           ~~~^~~~~~~
> > drivers/media/platform/mediatek/mdp3/mtk-img-ipi.h:137:25: note:
> > in definition of macro 'CFG_COMP'
> >   137 |         (IS_ERR_OR_NULL(comp) ? 0 : _CFG_COMP(plat, comp,
> mem))
> >       |                         ^~~~
> > drivers/media/platform/mediatek/mdp3/mtk-mdp3-cmdq.c:396:30:
> > note: 'ctx' was declared here
> >   396 |         struct mdp_comp_ctx *ctx;
> >       |
> > 
> > Fixes: 61890ccaefaf ("media: platform: mtk-mdp3: add MediaTek MDP3
> driver")
> > Signed-off-by: Moudy Ho <moudy.ho@...iatek.com>
> > ---
> >  drivers/media/platform/mediatek/mdp3/mtk-mdp3-cmdq.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/media/platform/mediatek/mdp3/mtk-mdp3-cmdq.c
> b/drivers/media/platform/mediatek/mdp3/mtk-mdp3-cmdq.c
> > index 15a0b944745e..4a8d941178aa 100644
> > --- a/drivers/media/platform/mediatek/mdp3/mtk-mdp3-cmdq.c
> > +++ b/drivers/media/platform/mediatek/mdp3/mtk-mdp3-cmdq.c
> > @@ -436,13 +436,13 @@ static int mdp_path_config(struct mdp_dev
> *mdp, struct mdp_cmdq_cmd *cmd,
> >  if (mdp_cfg_comp_is_dummy(path->mdp_dev, inner_id))
> >  continue;
> >  
> > +ctx = &path->comps[index];
> >  if (CFG_CHECK(MT8183, p_id))
> >  out = CFG_COMP(MT8183, ctx->param, outputs[0]);
> >  else if (CFG_CHECK(MT8195, p_id))
> >  out = CFG_COMP(MT8195, ctx->param, outputs[0]);
> >  
> >  compose = path->composes[out];
> > -ctx = &path->comps[index];
> >  ret = call_op(ctx, config_frame, cmd, compose);
> >  if (ret)
> >  return ret;
> 
> Hmm, this patch really should be a separate patch on top of the media
> staging branch: it is wrong there as well, except you don't get a
> build
> warning. Other changes in this patch series caused this warning to
> appear,
> but the actual bug is already present in the current staging code.
> 
> Regards,
> 
> Hans

Hi Hans,

Thanks for reminding me. I will separate this patc to address the
existing compilation warnings.

Sincerely,
Moudy

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ