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:	Fri, 25 Apr 2014 16:54:11 +0900
From:	Toshiaki Makita <makita.toshiaki@....ntt.co.jp>
To:	Stephen Hemminger <stephen@...workplumber.org>
Cc:	"David S. Miller" <davem@...emloft.net>,
	netdev <netdev@...r.kernel.org>,
	bridge <bridge@...ts.linux-foundation.org>,
	"C. R. Oldham" <cr@...tstack.com>, Tom Gundersen <teg@...m.no>
Subject: Re: [PATCH net] bridge: Handle IFLA_ADDRESS correctly when creating
 bridge device

On Thu, 2014-04-24 at 11:38 -0700, Stephen Hemminger wrote:
> On Thu, 24 Apr 2014 21:16:27 +0900
> Toshiaki Makita <makita.toshiaki@....ntt.co.jp> wrote:
> 
> > +static int br_dev_newlink(struct net *src_net, struct net_device *dev,
> > +			  struct nlattr *tb[], struct nlattr *data[])
> > +{
> > +	int err;
> > +	struct net_bridge *br = netdev_priv(dev);
> > +
> > +	if (tb[IFLA_ADDRESS]) {
> > +		spin_lock_bh(&br->lock);
> > +		br_stp_change_bridge_id(br, nla_data(tb[IFLA_ADDRESS]));
> > +		spin_unlock_bh(&br->lock);
> > +	}
> > +
> > +	err = register_netdevice(dev);
> > +	if (err)
> > +		return err;
> > +
> > +	return 0;
> > +}
> 
> Looks good.
> 
> Why not just do simpler tail call??
>     return register_netdevice(dev);

Yes, It's simpler.
I mimicked team_newlink()'s style, so we can also make it simpler
later :)

I'll send v2.

Thanks,
Toshiaki Makita

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