From: Cong Wang <amwang@redhat.com>
To: Flavio Leitner <fbl@sysclose.org>
Cc: Jay Vosburgh <fubar@us.ibm.com>,
Neil Horman <nhorman@tuxdriver.com>,
netdev@vger.kernel.org, Matt Mackall <mpm@selenic.com>,
bridge@lists.linux-foundation.org, linux-kernel@vger.kernel.org,
David Miller <davem@davemloft.net>,
Jeff Moyer <jmoyer@redhat.com>,
Andy Gospodarek <gospo@redhat.com>,
bonding-devel@lists.sourceforge.net
Subject: Re: [Bridge] [v5 Patch 1/3] netpoll: add generic support for bridge and bonding devices
Date: Fri, 28 May 2010 16:16:34 +0800 [thread overview]
Message-ID: <4BFF7BE2.6020503@redhat.com> (raw)
In-Reply-To: <20100527180545.GA2345@sysclose.org>
[-- Attachment #1: Type: text/plain, Size: 805 bytes --]
On 05/28/10 02:05, Flavio Leitner wrote:
>
> Hi guys!
>
> I finally could test this to see if an old problem reported on bugzilla[1] was
> fixed now, but unfortunately it is still there.
>
> The ticket is private I guess, but basically the problem happens when bonding
> driver tries to print something after it had taken the write_lock (monitor
> functions, enslave/de-enslave), so the printk() will pass through netpoll, then
> on bonding again which no matter what mode you use, it will try to read_lock()
> the lock again. The result is a deadlock and the entire system hangs.
>
Does the attached patch fix this hang?
Thanks!
----------------------->
We should notify netconsole that bond is changing its slaves
when we use active-backup mode.
Signed-off-by: WANG Cong <amwang@redhat.com>
----
[-- Attachment #2: drivers-net-bonding-fix-activebackup-deadlock.diff --]
[-- Type: text/x-patch, Size: 898 bytes --]
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 5e12462..9494c02 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -1199,6 +1199,7 @@ void bond_select_active_slave(struct bonding *bond)
best_slave = bond_find_best_slave(bond);
if (best_slave != bond->curr_active_slave) {
+ netdev_bonding_change(bond->dev, NETDEV_BONDING_DESLAVE);
bond_change_active_slave(bond, best_slave);
rv = bond_set_carrier(bond);
if (!rv)
@@ -2154,6 +2155,7 @@ static int bond_ioctl_change_active(struct net_device *bond_dev, struct net_devi
(old_active) &&
(new_active->link == BOND_LINK_UP) &&
IS_UP(new_active->dev)) {
+ netdev_bonding_change(bond->dev, NETDEV_BONDING_DESLAVE);
write_lock_bh(&bond->curr_slave_lock);
bond_change_active_slave(bond, new_active);
write_unlock_bh(&bond->curr_slave_lock);
WARNING: multiple messages have this Message-ID (diff)
From: Cong Wang <amwang@redhat.com>
To: Flavio Leitner <fbl@sysclose.org>
Cc: linux-kernel@vger.kernel.org, Matt Mackall <mpm@selenic.com>,
netdev@vger.kernel.org, bridge@lists.linux-foundation.org,
Andy Gospodarek <gospo@redhat.com>,
Neil Horman <nhorman@tuxdriver.com>,
Jeff Moyer <jmoyer@redhat.com>,
Stephen Hemminger <shemminger@linux-foundation.org>,
bonding-devel@lists.sourceforge.net,
Jay Vosburgh <fubar@us.ibm.com>,
David Miller <davem@davemloft.net>
Subject: Re: [v5 Patch 1/3] netpoll: add generic support for bridge and bonding devices
Date: Fri, 28 May 2010 16:16:34 +0800 [thread overview]
Message-ID: <4BFF7BE2.6020503@redhat.com> (raw)
In-Reply-To: <20100527180545.GA2345@sysclose.org>
[-- Attachment #1: Type: text/plain, Size: 805 bytes --]
On 05/28/10 02:05, Flavio Leitner wrote:
>
> Hi guys!
>
> I finally could test this to see if an old problem reported on bugzilla[1] was
> fixed now, but unfortunately it is still there.
>
> The ticket is private I guess, but basically the problem happens when bonding
> driver tries to print something after it had taken the write_lock (monitor
> functions, enslave/de-enslave), so the printk() will pass through netpoll, then
> on bonding again which no matter what mode you use, it will try to read_lock()
> the lock again. The result is a deadlock and the entire system hangs.
>
Does the attached patch fix this hang?
Thanks!
----------------------->
We should notify netconsole that bond is changing its slaves
when we use active-backup mode.
Signed-off-by: WANG Cong <amwang@redhat.com>
----
[-- Attachment #2: drivers-net-bonding-fix-activebackup-deadlock.diff --]
[-- Type: text/x-patch, Size: 898 bytes --]
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 5e12462..9494c02 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -1199,6 +1199,7 @@ void bond_select_active_slave(struct bonding *bond)
best_slave = bond_find_best_slave(bond);
if (best_slave != bond->curr_active_slave) {
+ netdev_bonding_change(bond->dev, NETDEV_BONDING_DESLAVE);
bond_change_active_slave(bond, best_slave);
rv = bond_set_carrier(bond);
if (!rv)
@@ -2154,6 +2155,7 @@ static int bond_ioctl_change_active(struct net_device *bond_dev, struct net_devi
(old_active) &&
(new_active->link == BOND_LINK_UP) &&
IS_UP(new_active->dev)) {
+ netdev_bonding_change(bond->dev, NETDEV_BONDING_DESLAVE);
write_lock_bh(&bond->curr_slave_lock);
bond_change_active_slave(bond, new_active);
write_unlock_bh(&bond->curr_slave_lock);
next prev parent reply other threads:[~2010-05-28 8:16 UTC|newest]
Thread overview: 73+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-05 8:11 [Bridge] [v5 Patch 1/3] netpoll: add generic support for bridge and bonding devices Amerigo Wang
2010-05-05 8:11 ` Amerigo Wang
2010-05-05 8:11 ` Amerigo Wang
2010-05-05 8:11 ` [Bridge] [v5 Patch 2/3] bridge: make bridge support netpoll Amerigo Wang
2010-05-05 8:11 ` Amerigo Wang
2010-05-05 8:11 ` Amerigo Wang
2010-05-05 8:11 ` [Bridge] [v5 Patch 3/3] bonding: make bonding " Amerigo Wang
2010-05-05 8:11 ` Amerigo Wang
2010-05-05 8:11 ` Amerigo Wang
2010-05-06 2:05 ` [Bridge] [v5 Patch 1/3] netpoll: add generic support for bridge and bonding devices Matt Mackall
2010-05-06 2:05 ` Matt Mackall
2010-05-06 7:44 ` [Bridge] " David Miller
2010-05-06 7:44 ` David Miller
2010-05-07 3:24 ` [Bridge] " Cong Wang
2010-05-07 3:24 ` Cong Wang
2010-05-27 18:05 ` [Bridge] " Flavio Leitner
2010-05-27 18:05 ` Flavio Leitner
2010-05-27 20:35 ` [Bridge] " David Miller
2010-05-27 20:35 ` David Miller
2010-05-27 21:25 ` [Bridge] " Flavio Leitner
2010-05-27 21:25 ` Flavio Leitner
2010-05-28 2:47 ` [Bridge] " Cong Wang
2010-05-28 2:47 ` Cong Wang
2010-05-28 19:40 ` [Bridge] " Flavio Leitner
2010-05-28 19:40 ` Flavio Leitner
2010-05-31 5:56 ` [Bridge] " Cong Wang
2010-05-31 5:56 ` Cong Wang
2010-05-31 19:08 ` [Bridge] " Flavio Leitner
2010-05-31 19:08 ` Flavio Leitner
2010-06-01 9:57 ` [Bridge] " Cong Wang
2010-06-01 9:57 ` Cong Wang
2010-06-01 18:42 ` [Bridge] " Jay Vosburgh
2010-06-01 18:42 ` Jay Vosburgh
2010-06-02 10:04 ` [Bridge] " Cong Wang
2010-06-02 10:04 ` Cong Wang
2010-06-04 19:18 ` [Bridge] " Andy Gospodarek
2010-06-04 19:18 ` Andy Gospodarek
2010-06-07 9:57 ` [Bridge] " Cong Wang
2010-06-07 9:57 ` Cong Wang
2010-06-07 10:01 ` [Bridge] " David Miller
2010-06-07 10:01 ` David Miller
2010-06-08 8:36 ` [Bridge] " Cong Wang
2010-06-08 8:36 ` Cong Wang
2010-06-07 13:03 ` [Bridge] " Andy Gospodarek
2010-06-07 13:03 ` Andy Gospodarek
2010-06-08 8:38 ` [Bridge] " Cong Wang
2010-06-08 8:38 ` Cong Wang
2010-06-07 19:24 ` [Bridge] [PATCH] netconsole: queue console messages to send later Flavio Leitner
2010-06-07 19:24 ` Flavio Leitner
2010-06-07 19:50 ` [Bridge] " Matt Mackall
2010-06-07 19:50 ` Matt Mackall
2010-06-07 20:00 ` [Bridge] " Stephen Hemminger
2010-06-07 20:00 ` Stephen Hemminger
2010-06-07 20:21 ` [Bridge] " Matt Mackall
2010-06-07 20:21 ` Matt Mackall
2010-06-07 23:52 ` [Bridge] " David Miller
2010-06-07 23:52 ` David Miller
2010-06-07 23:50 ` [Bridge] " David Miller
2010-06-07 23:50 ` David Miller
2010-06-08 0:37 ` [Bridge] " Flavio Leitner
2010-06-08 0:37 ` Flavio Leitner
2010-06-08 8:59 ` [Bridge] " Cong Wang
2010-06-08 8:59 ` Cong Wang
2010-05-28 8:16 ` Cong Wang [this message]
2010-05-28 8:16 ` [v5 Patch 1/3] netpoll: add generic support for bridge and bonding devices Cong Wang
2010-05-28 20:42 ` [Bridge] " Flavio Leitner
2010-05-28 20:42 ` Flavio Leitner
2010-05-28 21:03 ` [Bridge] " Jay Vosburgh
2010-05-28 21:03 ` Jay Vosburgh
2010-05-31 5:29 ` [Bridge] " Cong Wang
2010-05-31 5:29 ` Cong Wang
2010-05-31 5:37 ` [Bridge] " Cong Wang
2010-05-31 5:37 ` Cong Wang
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=4BFF7BE2.6020503@redhat.com \
--to=amwang@redhat.com \
--cc=bonding-devel@lists.sourceforge.net \
--cc=bridge@lists.linux-foundation.org \
--cc=davem@davemloft.net \
--cc=fbl@sysclose.org \
--cc=fubar@us.ibm.com \
--cc=gospo@redhat.com \
--cc=jmoyer@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mpm@selenic.com \
--cc=netdev@vger.kernel.org \
--cc=nhorman@tuxdriver.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.