Files
linux/drivers/net
Andy Gospodarek ce39a800ea bonding: fix panic when taking bond interface down before removing module
A panic was discovered with bonding when using mode 5 or 6 and trying to
remove the slaves from the bond after the interface was taken down.
When calling 'ifconfig bond0 down' the following happens:

    bond_close()
        bond_alb_deinitialize()
            tlb_deinitialize()
		kfree(bond_info->tx_hashtbl)
                bond_info->tx_hashtbl = NULL

Unfortunately if there are still slaves in the bond, when removing the
module the following happens:

    bonding_exit()
        bond_free_all()
            bond_release_all()
                bond_alb_deinit_slave()
                    tlb_clear_slave()
                        tx_hash_table = BOND_ALB_INFO(bond).tx_hashtbl
			u32 next_index = tx_hash_table[index].next

As you might guess we panic when trying to access a few entries into the
table that no longer exists.

I experimented with several options (like moving the calls to
tlb_deinitialize somewhere else), but it really makes the most sense to
be part of the bond_close routine.  It also didn't seem logical move
tlb_clear_slave around too much, so the simplest option seems to add a
check in tlb_clear_slave to make sure we haven't already wiped the
tx_hashtbl away before searching for all the non-existent hash-table
entries that used to point to the slave as the output interface.

Signed-off-by: Andy Gospodarek <andy@greyhouse.net>
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-10-31 00:46:12 -04:00
..
2008-10-08 16:09:24 -07:00
2008-10-16 16:52:05 +02:00
2008-10-08 16:53:40 -07:00
2008-09-24 18:54:42 -04:00
2008-10-27 17:46:11 -04:00
2008-10-16 16:52:05 +02:00
2006-09-13 13:24:59 -04:00
2008-01-28 15:04:05 -08:00
2006-09-13 13:24:59 -04:00
2006-09-13 13:24:59 -04:00
2008-06-10 18:20:17 -04:00
2006-09-13 13:24:59 -04:00
2008-08-14 04:26:38 -04:00
2008-10-28 15:50:54 -07:00
2007-10-10 16:51:43 -07:00
2008-10-12 21:15:17 -07:00
2006-09-13 13:24:59 -04:00
2008-07-18 17:54:17 -07:00
2008-10-09 12:22:38 -07:00
2008-10-09 12:27:06 -07:00
2008-10-09 12:26:41 -07:00
2008-08-13 16:05:38 -07:00
2008-08-13 16:05:37 -07:00
2008-08-13 16:05:38 -07:00
2008-08-13 16:05:37 -07:00
2008-09-09 05:07:25 -07:00
2008-08-13 16:05:37 -07:00
2008-09-03 14:38:00 -07:00
2008-09-22 19:27:10 -07:00
2008-09-22 19:27:10 -07:00
2006-09-13 13:24:59 -04:00
2008-03-26 00:18:43 -04:00
2007-02-09 16:23:17 +00:00
2006-09-13 13:24:59 -04:00
2008-02-01 20:54:03 +11:00
2007-10-10 16:51:13 -07:00
2007-10-10 16:51:13 -07:00
2008-01-28 15:07:59 -08:00
2006-09-13 13:24:59 -04:00
2008-10-08 17:09:54 -07:00
2008-05-22 14:12:40 -04:00
2008-01-28 15:07:12 -08:00
2006-09-13 13:24:59 -04:00
2008-09-16 19:35:05 -07:00
2008-07-22 17:50:44 -04:00
2008-08-27 05:36:57 -04:00
2008-07-25 15:44:44 +10:00
2008-03-17 08:11:41 -04:00
2008-08-14 04:26:38 -04:00
2008-10-08 19:51:33 -07:00
2008-04-25 02:08:51 -04:00
2008-01-28 15:07:12 -08:00
2007-10-19 11:53:42 -07:00
2007-04-28 11:01:05 -04:00
2008-10-08 17:09:54 -07:00
2008-07-22 17:50:44 -04:00
2008-03-17 07:56:33 -04:00
2008-03-26 00:18:00 -04:00
2006-09-13 13:24:59 -04:00
2008-05-30 22:19:22 -04:00
2008-03-05 16:34:41 -06:00
2008-07-20 17:12:34 -07:00
2008-01-28 15:11:27 -08:00
2008-07-20 17:12:34 -07:00
2008-06-20 21:58:02 -07:00
2008-10-17 02:38:35 +11:00
2008-08-07 02:11:15 -04:00
2008-01-28 15:03:59 -08:00
2008-04-16 20:41:44 -04:00
2008-05-30 22:07:17 -04:00
2008-08-07 02:20:57 -04:00
2006-09-13 13:24:59 -04:00
2007-10-16 21:10:29 -04:00
2008-10-12 20:59:48 -07:00
2008-08-07 01:55:50 -04:00
2008-01-28 15:11:27 -08:00
2008-07-20 17:12:34 -07:00
2006-09-13 13:24:59 -04:00
2008-10-22 06:22:13 -04:00
2008-01-28 15:03:59 -08:00
2007-05-04 17:59:08 -07:00
2007-07-16 15:02:47 +02:00
2008-04-16 20:06:50 -04:00
2008-08-29 02:13:33 -07:00
2008-03-23 03:35:12 -07:00
2008-01-28 15:07:10 -08:00
2008-08-29 02:14:29 -07:00
2008-08-31 20:59:37 -07:00
2008-08-29 02:14:43 -07:00
2008-10-12 21:01:53 -07:00
2007-10-10 16:51:34 -07:00
2008-05-30 22:18:02 -04:00