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: <20130705.014042.1794673817887092292.davem@davemloft.net>
Date:	Fri, 05 Jul 2013 01:40:42 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	wangyufen@...wei.com
Cc:	netdev@...r.kernel.org, lizefan@...wei.com,
	zhangdianfang@...wei.com
Subject: Re: [PATCH] bonding:fix speed unknown,lacp bonding failed

From: Wangyufen <wangyufen@...wei.com>
Date: Fri, 5 Jul 2013 14:32:59 +0800

> @@ -2301,8 +2301,11 @@ static int bond_miimon_inspect(struct bonding *bond)

>  		switch (slave->link) {
>  		case BOND_LINK_UP:
> -			if (link_state)
> +			if (link_state) {
> +				if (slave->speed == SPEED_UNKNOWN)
> +					bond_update_speed_duplex(slave);
>  				continue;

bond_miimon_inspect() does not hold the RTNL mutex, and it is required
that the RTNL mutex is held when bond_update_speed_duplex() is called.

If you ran this new code, you should be hitting the assertion at the
beginning of __ethtool_get_settings() which reads:

	ASSERT_RTNL();

In fact, if you look at bond_miimon_inspect()'s caller it goes:

		if (!rtnl_trylock()) {

right after calling bond_miimon_inspect().
--
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