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 Jan 2015 16:30:30 +0000
From:	Ben Hutchings <ben@...adent.org.uk>
To:	David Decotigny <ddecotig@...il.com>
Cc:	"David S. Miller" <davem@...emloft.net>,
	Amir Vadai <amirv@...lanox.com>, linux-kernel@...r.kernel.org,
	netdev@...r.kernel.org, linux-api@...r.kernel.org,
	Eric Dumazet <edumazet@...gle.com>,
	Eugenia Emantayev <eugenia@...lanox.co.il>,
	Or Gerlitz <ogerlitz@...lanox.com>,
	Ido Shamay <idos@...lanox.com>, Joe Perches <joe@...ches.com>,
	Saeed Mahameed <saeedm@...lanox.com>,
	Govindarajulu Varadarajan <_govind@....com>,
	Venkata Duvvuru <VenkatKumar.Duvvuru@...lex.Com>,
	Jeff Kirsher <jeffrey.t.kirsher@...el.com>,
	Eyal Perry <eyalpe@...lanox.com>,
	Pravin B Shelar <pshelar@...ira.com>,
	Ed Swierk <eswierk@...portsystems.com>,
	David Decotigny <decot@...glers.com>
Subject: Re: [PATCH net-next v1 01/18] net: ethtool: propagate get_settings
 error

On Mon, 2015-01-26 at 17:35 -0800, David Decotigny wrote:
> From: David Decotigny <decot@...glers.com>
> 
> Signed-off-by: David Decotigny <decot@...glers.com>
> ---
>  net/core/ethtool.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/net/core/ethtool.c b/net/core/ethtool.c
> index 91f74f3..52efb7e 100644
> --- a/net/core/ethtool.c
> +++ b/net/core/ethtool.c
> @@ -364,7 +364,7 @@ static int ethtool_get_settings(struct net_device *dev, void __user *useraddr)
>  
>  	if (copy_to_user(useraddr, &cmd, sizeof(cmd)))
>  		return -EFAULT;
> -	return 0;
> +	return err;

err cannnot be negative at this point (and if it's positive, that's a
bug in the get_settings implementation which we happen to fix up).

Ben.

>  }
>  
>  static int ethtool_set_settings(struct net_device *dev, void __user *useraddr)

-- 
Ben Hutchings
Teamwork is essential - it allows you to blame someone else.

Download attachment "signature.asc" of type "application/pgp-signature" (812 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ