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: <20150203.161054.379086029122558267.davem@davemloft.net>
Date:	Tue, 03 Feb 2015 16:10:54 -0800 (PST)
From:	David Miller <davem@...emloft.net>
To:	elfring@...rs.sourceforge.net
Cc:	jhs@...atatu.com, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org,
	julia.lawall@...6.fr
Subject: Re: [PATCH] net: sched: One function call less in em_meta_change()
 after error detection

From: SF Markus Elfring <elfring@...rs.sourceforge.net>
Date: Sat, 31 Jan 2015 17:34:54 +0100

> From: Markus Elfring <elfring@...rs.sourceforge.net>
> Date: Sat, 31 Jan 2015 17:18:48 +0100
> 
> The meta_delete() function could be called in four cases by the
> em_meta_change() function during error handling even if the passed
> variable "meta" contained still a null pointer.
> 
> * This implementation detail could be improved by adjustments for jump labels.
> 
> * Let us return immediately after the first failed function call according to
>   the current Linux coding style convention.
> 
> * Let us delete also unnecessary checks for the variables "err" and
>   "meta" there.
> 
> Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>

I kind of like the way the code is now, branching to the end of the function
even when cleanups are not necessary.

Inter-function return statements make code harder to audit, for locking
errors, resource leaks, etc.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ