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: <1405614968.12363.28.camel@joe-AO725>
Date:	Thu, 17 Jul 2014 09:36:08 -0700
From:	Joe Perches <joe@...ches.com>
To:	Veaceslav Falico <vfalico@...il.com>
Cc:	netdev@...r.kernel.org, "David S. Miller" <davem@...emloft.net>,
	Tom Gundersen <teg@...m.no>
Subject: Re: [PATCH v2 net-next 1/2] net: use dev->name in netdev_pr* when
 it's available

On Thu, 2014-07-17 at 18:25 +0200, Veaceslav Falico wrote:
> On Thu, Jul 17, 2014 at 09:18:44AM -0700, Joe Perches wrote:
> >On Thu, 2014-07-17 at 16:09 +0200, Veaceslav Falico wrote:
> >> netdev_name() returns dev->name only when the net_device is in
> >> NETREG_REGISTERED state.
[]
> >Maybe this should not be inline and become something like:
> 
> It will miss the states then, when it's not NETREG_REGISTERED.

If it's registered, it has a valid name via
dev_get_valid_name() doesn't it?

> >const char *netdev_name(const struct net_device *dev)
> >{
> >	if (dev->reg_state == NETREG_REGISTERED)
> >		return dev->name;
> >
> >	if (!dev->name[0])
> >		return "(unnamed net_device)";
> >
> >	if (!strchr(dev->name, '%'))
> >		return "(unregistered net_device)";
> >
> >	return dev->name;
> >}
> >EXPORT_SYMBOL(netdev_name);



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