All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch][bonding] fix kernel panic when removing the primary slave
@ 2003-08-20 14:33 Shmulik Hen
  2003-08-20 16:11 ` Shmulik Hen
  0 siblings, 1 reply; 2+ messages in thread
From: Shmulik Hen @ 2003-08-20 14:33 UTC (permalink / raw)
  To: bonding-devel, netdev

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [patch][bonding] fix kernel panic when removing the primary slave
  2003-08-20 14:33 [patch][bonding] fix kernel panic when removing the primary slave Shmulik Hen
@ 2003-08-20 16:11 ` Shmulik Hen
  0 siblings, 0 replies; 2+ messages in thread
From: Shmulik Hen @ 2003-08-20 16:11 UTC (permalink / raw)
  To: bonding-devel, netdev

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-08-20 16:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 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.