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: <AE90C24D6B3A694183C094C60CF0A2F6026B7365@saturn3.aculab.com>
Date:	Fri, 27 Sep 2013 15:50:12 +0100
From:	"David Laight" <David.Laight@...LAB.COM>
To:	"Veaceslav Falico" <vfalico@...hat.com>, <netdev@...r.kernel.org>
Cc:	<nikolay@...hat.com>, <bhutchings@...arflare.com>,
	"Jay Vosburgh" <fubar@...ibm.com>,
	"Andy Gospodarek" <andy@...yhouse.net>
Subject: RE: [PATCH net-next 2/9] bonding: remove __get_first_port()

> @@ -2104,8 +2091,11 @@ void bond_3ad_state_machine_handler(struct work_struct *work)
> 
>  	// check if agg_select_timer timer after initialize is timed out
>  	if (BOND_AD_INFO(bond).agg_select_timer && !(--BOND_AD_INFO(bond).agg_select_timer)) {
> +		slave = bond_first_slave(bond);
> +		port = slave ? &(SLAVE_AD_INFO(slave).port) : NULL;
> +
>  		// select the active aggregator for the bond
> -		if ((port = __get_first_port(bond))) {
> +		if (port) {
>  			if (!port->slave) {
>  				pr_warning("%s: Warning: bond's first port is uninitialized\n",
>  					   bond->dev->name);
> --

Looks like that could be:
		slave = bond_first_slave(bond);
		if (slave) {
			port = SLAVE_AD_INFO(slave).port;
and I assume 'slave == port->slave' so there is no need for the latter check?

	David



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