From: wangyufen <wangyufen@huawei.com>
To: David Miller <davem@davemloft.net>
Cc: <netdev@vger.kernel.org>, <lizefan@huawei.com>,
<zhangdianfang@huawei.com>
Subject: Re: [PATCH] bonding:fix speed unknown,lacp bonding failed
Date: Fri, 5 Jul 2013 18:10:30 +0800 [thread overview]
Message-ID: <51D69B96.60002@huawei.com> (raw)
In-Reply-To: <20130705.014042.1794673817887092292.davem@davemloft.net>
On 2013/7/5 16:40, David Miller wrote:
> From: Wangyufen <wangyufen@huawei.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().
OK,thanks.
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
>
next prev parent reply other threads:[~2013-07-05 10:11 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-05 6:32 [PATCH] bonding:fix speed unknown,lacp bonding failed Wangyufen
2013-07-05 8:40 ` David Miller
2013-07-05 10:10 ` wangyufen [this message]
2013-07-05 9:20 ` Veaceslav Falico
2013-07-05 10:08 ` wangyufen
2013-07-05 14:54 ` Ben Hutchings
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=51D69B96.60002@huawei.com \
--to=wangyufen@huawei.com \
--cc=davem@davemloft.net \
--cc=lizefan@huawei.com \
--cc=netdev@vger.kernel.org \
--cc=zhangdianfang@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).