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]
Message-ID: <20231118202207.16a60834@kernel.org>
Date: Sat, 18 Nov 2023 20:22:07 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: Louis Peens <louis.peens@...igine.com>
Cc: Denis Arefev <arefev@...mel.ru>, "David S. Miller"
 <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, Paolo Abeni
 <pabeni@...hat.com>, oss-drivers@...igine.com, netdev@...r.kernel.org,
 linux-kernel@...r.kernel.org, lvc-project@...uxtesting.org
Subject: Re: [PATCH] nfp: flower: Added pointer check and continue.

On Fri, 17 Nov 2023 16:27:17 +0200 Louis Peens wrote:
> >                 acti_netdevs = kmalloc_array(entry->slave_cnt,
> >                                              sizeof(*acti_netdevs), GFP_KERNEL);
> > 

Unnecessary new line, please remove it.
There should be no empty lines between call and error check.

> > +               if (!acti_netdevs) {
> > +                       schedule_delayed_work(&lag->work, NFP_FL_LAG_DELAY);
> > +                       continue;
> > +               }
> > +  
> Thanks for reporting this Denis, it definitely seems to be an oversight.
> Would you mind adding a 'nfp_flower_cmsg_warn' here as well, so that
> this case does not go undetected? Maybe something like "cannot
> allocate memory for group processing" can work.

There's a checkpatch check against printing warnings on allocation
failures. Kernel will complain loudly on OOM, anyway, there's no need
for a local print.
-- 
pw-bot: cr

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ