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:	Sat, 26 Apr 2008 08:35:24 +0200
From:	Wolfgang Grandegger <wg@...ndegger.com>
To:	David Miller <davem@...emloft.net>
CC:	oliver.hartkopp@...kswagen.de, xemul@...nvz.org,
	socketcan-core@...ts.berlios.de, netdev@...r.kernel.org,
	urs.thuermann@...kswagen.de
Subject: Re: [PATCH][CAN]: Fix copy_from_user() results interpretation.

David Miller wrote:
> From: Wolfgang Grandegger <wg@...ndegger.com>
> Date: Sat, 26 Apr 2008 08:19:31 +0200
> 
>> What about removing the assignment "err =" in that case. It's confusing
>> otherwise and maybe the variable err is even obsolete.
> 
> Sure, but when fixing a bug it's better to have a completely
> localized change like this.
> 
> Not something which restructures the code unnecessarily at
> the same time, that make it so much harder to review and
> validate.

Well, really,

   if (func(x))
        return -EFAULT;

instead of

   err = func(x);
   if (err)
	return -EFAULT;

is more straight forward and less confusing and I do not understand, why
it should be harder to review.

Wolfgang.

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ