From: Shmulik Hen <shmulik.hen@intel.com>
To: bonding-devel@lists.sourceforge.net, netdev@oss.sgi.com
Subject: [patch][bonding] fix kernel panic when removing the primary slave
Date: Wed, 20 Aug 2003 19:11:27 +0300 [thread overview]
Message-ID: <200308201911.27902.shmulik.hen@intel.com> (raw)
In-Reply-To: <200308201733.31144.shmulik.hen@intel.com>
When releasing the primary slave, there is a kernel panic because
the bond->primary_slave is not set to NULL until after calling
change_active_interface(), even though the slave was already
detached from the slave list.
Patch is against 2.4.22-rc2.
--
| Shmulik Hen Advanced Network Services |
| Israel Design Center, Jerusalem |
| LAN Access Division, Platform Networking |
| Intel Communications Group, Intel corp. |
diff -Nuarp a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
--- a/drivers/net/bonding/bond_main.c 2003-08-20 17:17:57.000000000 +0300
+++ b/drivers/net/bonding/bond_main.c 2003-08-20 17:19:11.000000000 +0300
@@ -1976,6 +1976,10 @@ static int bond_release(struct net_devic
/* release the slave from its bond */
bond_detach_slave(bond, our_slave);
+ if (bond->primary_slave == our_slave) {
+ bond->primary_slave = NULL;
+ }
+
printk (KERN_INFO "%s: releasing %s interface %s",
master->name,
(our_slave->state == BOND_STATE_ACTIVE) ? "active" : "backup",
@@ -1994,10 +1998,6 @@ static int bond_release(struct net_devic
master->name);
}
- if (bond->primary_slave == our_slave) {
- bond->primary_slave = NULL;
- }
-
if ((bond_mode == BOND_MODE_TLB) ||
(bond_mode == BOND_MODE_ALB)) {
/* must be called only after the slave has been
prev parent reply other threads:[~2003-08-20 16:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-08-20 14:33 [patch][bonding] fix kernel panic when removing the primary slave Shmulik Hen
2003-08-20 16:11 ` Shmulik Hen [this message]
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=200308201911.27902.shmulik.hen@intel.com \
--to=shmulik.hen@intel.com \
--cc=bonding-devel@lists.sourceforge.net \
--cc=netdev@oss.sgi.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).