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: <F3E01662-FC33-4FB8-AF30-47DF44252296@intel.com>
Date:	Mon, 5 Aug 2013 18:18:01 +0000
From:	"Rustad, Mark D" <mark.d.rustad@...el.com>
To:	Dan Carpenter <dan.carpenter@...cle.com>
CC:	"David S. Miller" <davem@...emloft.net>,
	Alexey Kuznetsov <kuznet@....inr.ac.ru>,
	James Morris <jmorris@...ei.org>,
	Hideaki YOSHIFUJI <yoshfuji@...ux-ipv6.org>,
	Patrick McHardy <kaber@...sh.net>,
	"<netdev@...r.kernel.org>" <netdev@...r.kernel.org>,
	"<kernel-janitors@...r.kernel.org>" <kernel-janitors@...r.kernel.org>
Subject: Re: [patch] net: remove an unneeded check

On Jul 29, 2013, at 12:15 PM, Dan Carpenter <dan.carpenter@...cle.com> wrote:

> "ifa->ifa_label" is an array inside the in_ifaddr struct.  It can never
> be NULL so we can remove this check.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>
> 
> diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
> index 8d48c39..1b7f7ae 100644
> --- a/net/ipv4/devinet.c
> +++ b/net/ipv4/devinet.c
> @@ -1124,10 +1124,7 @@ static int inet_gifconf(struct net_device *dev, char __user *buf, int len)
> 		if (len < (int) sizeof(ifr))
> 			break;
> 		memset(&ifr, 0, sizeof(struct ifreq));
> -		if (ifa->ifa_label)

Is there any possibility that this was meant to check ifa->ifa_label[0]?

> -			strcpy(ifr.ifr_name, ifa->ifa_label);
> -		else
> -			strcpy(ifr.ifr_name, dev->name);
> +		strcpy(ifr.ifr_name, ifa->ifa_label);
> 
> 		(*(struct sockaddr_in *)&ifr.ifr_addr).sin_family = AF_INET;
> 		(*(struct sockaddr_in *)&ifr.ifr_addr).sin_addr.s_addr =

-- 
Mark Rustad, Networking Division, Intel Corporation

--
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