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] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 20 Apr 2021 17:28:43 +0800
From:   Zhu Yanjun <zyjzyj2000@...il.com>
To:     Leon Romanovsky <leon@...nel.org>
Cc:     wangyunjian <wangyunjian@...wei.com>,
        Jakub Kicinski <kuba@...nel.org>,
        "David S. Miller" <davem@...emloft.net>, saeedm@...dia.com,
        netdev <netdev@...r.kernel.org>, dingxiaoxiong@...wei.com
Subject: Re: [PATCH net-next v2] net/mlx5e: Fix uninitialised struct field moder.comps

On Tue, Apr 20, 2021 at 5:21 PM Leon Romanovsky <leon@...nel.org> wrote:
>
> On Tue, Apr 20, 2021 at 03:09:03PM +0800, Zhu Yanjun wrote:
> > On Tue, Apr 20, 2021 at 3:01 PM wangyunjian <wangyunjian@...wei.com> wrote:
> > >
> > > From: Yunjian Wang <wangyunjian@...wei.com>
> > >
> > > The 'comps' struct field in 'moder' is not being initialized in
> > > mlx5e_get_def_rx_moderation() and mlx5e_get_def_tx_moderation().
> > > So initialize 'moder' to zero to avoid the issue.
>
> Please state that it is false alarm and this patch doesn't fix anything
> except broken static analyzer tool.
>
> > >
> > > Addresses-Coverity: ("Uninitialized scalar variable")
> > > Signed-off-by: Yunjian Wang <wangyunjian@...wei.com>
> > > ---
> > > v2: update mlx5e_get_def_tx_moderation() also needs fixing
> > > ---
> > >  drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 4 ++--
> > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
> > > index 5db63b9f3b70..17a817b7e539 100644
> > > --- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
> > > +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
> > > @@ -4868,7 +4868,7 @@ static bool slow_pci_heuristic(struct mlx5_core_dev *mdev)
> > >
> > >  static struct dim_cq_moder mlx5e_get_def_tx_moderation(u8 cq_period_mode)
> > >  {
> > > -       struct dim_cq_moder moder;
> >
> > > +       struct dim_cq_moder moder = {};
> >
> > If I remember correctly, some gcc compiler will report errors about this "{}".
>
> Kernel doesn't support such compilers.

Are you sure? Why are you so confirmative?

Zhu Yanjun

>
> Thanks

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ