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]
Date: Wed, 28 Feb 2024 17:59:31 +0300
From: Dan Carpenter <dan.carpenter@...aro.org>
To: Jiri Pirko <jiri@...nulli.us>
Cc: Jakub Kicinski <kuba@...nel.org>,
	Markus Elfring <Markus.Elfring@....de>, netdev@...r.kernel.org,
	kernel-janitors@...r.kernel.org,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Madalin Bucur <madalin.bucur@....com>,
	Paolo Abeni <pabeni@...hat.com>,
	Sean Anderson <sean.anderson@...o.com>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] net: fman: Use common error handling code in dtsec_init()

On Wed, Feb 28, 2024 at 08:51:49AM +0100, Jiri Pirko wrote:
> Wed, Feb 28, 2024 at 03:46:57AM CET, kuba@...nel.org wrote:
> >On Tue, 27 Feb 2024 14:14:52 +0100 Markus Elfring wrote:
> >> Adjust jump targets so that a bit of exception handling can be better
> >> reused at the end of this function implementation.
> >
> >Okay, but..
> >
> >>  .../net/ethernet/freescale/fman/fman_dtsec.c  | 19 +++++++++++--------
> >>  1 file changed, 11 insertions(+), 8 deletions(-)
> >
> >..you've added more lines than you've removed so what's the point.
> 
> To have cleaner error path? Not always lines of code is the correct
> indicator of patch quality :)
> 

I really don't like those goto e_nomem type of things.  When you're
laddering gotos you should do that kind of thing before the gotos so
that when people add new gotos it doesn't make a mess.  It's the same
for unlocks, do that before the goto unless it matches a lock at the
very start of the function.  Or if you're doing a goto from inside a
loop then clean up the partial iteration through the loop before the
goto.

regards,
dan carpenter


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ