From: Jay Vosburgh <fubar@us.ibm.com>
To: paul@mad-scientist.net
Cc: Linux netdev <netdev@vger.kernel.org>,
"David S. Miller" <davem@davemloft.net>
Subject: Re: 2.6.27.18: bnx2/tg3: BUG: "scheduling while atomic" trying toifenslave a second interface to my bond
Date: Mon, 04 May 2009 12:03:37 -0700 [thread overview]
Message-ID: <4086.1241463817@death.nxdomain.ibm.com> (raw)
In-Reply-To: <1241397581.6499.658.camel@homebase.localnet>
Paul Smith <paul@mad-scientist.net> wrote:
>Hi Jay/David/etc.;
>
>This patch is critical for me to properly use mode 6 (balance-alb)
>bonding; I assume it will be needed for others as well. I haven't
>checked to see if it's still necessary in 2.6.29/2.6.30, but I didn't
>notice it going into the latest 2.6.27.22, released today.
>
>Is this still unofficial? Is there an official patch on the horizon?
David, please apply and queue for -stable:
Subject: [PATCH] bonding: fix alb mode locking regression
Fix locking issue in alb MAC address management; removed
incorrect locking and replaced with correct locking. This bug was
introduced in commit:
commit 059fe7a578fba5bbb0fdc0365bfcf6218fa25eb0
Author: Jay Vosburgh <fubar@us.ibm.com>
Date: Wed Oct 17 17:37:49 2007 -0700
bonding: Convert locks to _bh, rework alb locking for new locking
Bug reported by Paul Smith <paul@mad-scientist.net>, who also
tested the fix.
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
diff --git a/drivers/net/bonding/bond_alb.c b/drivers/net/bonding/bond_alb.c
index 553a899..46d312b 100644
--- a/drivers/net/bonding/bond_alb.c
+++ b/drivers/net/bonding/bond_alb.c
@@ -1706,10 +1706,8 @@ void bond_alb_handle_active_change(struct bonding *bond, struct slave *new_slave
* Called with RTNL
*/
int bond_alb_set_mac_address(struct net_device *bond_dev, void *addr)
- __releases(&bond->curr_slave_lock)
- __releases(&bond->lock)
__acquires(&bond->lock)
- __acquires(&bond->curr_slave_lock)
+ __releases(&bond->lock)
{
struct bonding *bond = netdev_priv(bond_dev);
struct sockaddr *sa = addr;
@@ -1745,9 +1743,6 @@ int bond_alb_set_mac_address(struct net_device *bond_dev, void *addr)
}
}
- write_unlock_bh(&bond->curr_slave_lock);
- read_unlock(&bond->lock);
-
if (swap_slave) {
alb_swap_mac_addr(bond, swap_slave, bond->curr_active_slave);
alb_fasten_mac_swap(bond, swap_slave, bond->curr_active_slave);
@@ -1755,16 +1750,15 @@ int bond_alb_set_mac_address(struct net_device *bond_dev, void *addr)
alb_set_slave_mac_addr(bond->curr_active_slave, bond_dev->dev_addr,
bond->alb_info.rlb_enabled);
+ read_lock(&bond->lock);
alb_send_learning_packets(bond->curr_active_slave, bond_dev->dev_addr);
if (bond->alb_info.rlb_enabled) {
/* inform clients mac address has changed */
rlb_req_update_slave_clients(bond, bond->curr_active_slave);
}
+ read_unlock(&bond->lock);
}
- read_lock(&bond->lock);
- write_lock_bh(&bond->curr_slave_lock);
-
return 0;
}
next prev parent reply other threads:[~2009-05-04 19:03 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-13 21:15 2.6.27.18: bnx2/tg3: BUG: "scheduling while atomic" trying to ifenslave a second interface to my bond Paul Smith
2009-04-14 16:01 ` Paul Smith
2009-04-14 21:29 ` Brian Haley
2009-04-15 1:12 ` Jay Vosburgh
2009-04-15 3:23 ` David Miller
2009-04-15 5:29 ` Paul Smith
2009-04-15 16:56 ` Paul Smith
2009-04-15 18:11 ` Jay Vosburgh
2009-04-15 18:39 ` Paul Smith
[not found] ` <1241397581.6499.658.camel@homebase.localnet>
2009-05-04 19:03 ` Jay Vosburgh [this message]
2009-05-04 19:06 ` 2.6.27.18: bnx2/tg3: BUG: "scheduling while atomic" trying toifenslave " David Miller
2009-05-04 22:38 ` Paul Smith
2009-05-04 22:44 ` David Miller
2009-05-05 0:59 ` Paul Smith
2009-05-04 23:00 ` 2.6.27.18: bnx2/tg3: BUG: "scheduling while atomic" tryingtoifenslave " Jay Vosburgh
2009-05-04 23:04 ` David Miller
2009-05-04 23:05 ` 2.6.27.18: bnx2/tg3: BUG: "scheduling while atomic" trying toifenslave " Ben Hutchings
2009-05-04 23:12 ` David Miller
2009-05-05 4:32 ` David Miller
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=4086.1241463817@death.nxdomain.ibm.com \
--to=fubar@us.ibm.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=paul@mad-scientist.net \
/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).