linux/drivers/net/bonding
stephen hemminger f7d9821a6a bonding: fix error handling if slave is busy (v2)
If slave device already has a receive handler registered, then the
error unwind of bonding device enslave function is broken.

The following will leave a pointer to freed memory in the slave
device list, causing a later kernel panic.
# modprobe dummy
# ip li add dummy0-1 link dummy0 type macvlan
# modprobe bonding
# echo +dummy0 >/sys/class/net/bond0/bonding/slaves

The fix is to detach the slave (which removes it from the list)
in the unwind path.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Reviewed-by: Nicolas de Pesloüan <nicolas.2p.debian@free.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-01-03 12:49:16 -05:00
..
bond_3ad.c bonding: eliminate bond_close race conditions 2011-10-30 03:13:14 -04:00
bond_3ad.h bonding: delete unused ad_timer 2011-06-09 15:02:19 -07:00
bond_alb.c bonding: eliminate bond_close race conditions 2011-10-30 03:13:14 -04:00
bond_alb.h bonding: move processing of recv handlers into handle_frame() 2011-04-25 12:00:30 -07:00
bond_debugfs.c bonding: add the debugfs interface to see RLB hash table 2010-12-16 13:16:05 -08:00
bond_main.c bonding: fix error handling if slave is busy (v2) 2012-01-03 12:49:16 -05:00
bond_procfs.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2011-11-07 10:55:33 -08:00
bond_sysfs.c bonding: Don't allow mode change via sysfs with slaves present 2011-11-17 19:31:54 -05:00
bonding.h bonding: eliminate bond_close race conditions 2011-10-30 03:13:14 -04:00
Makefile bonding, ipv4, ipv6, vlan: Handle NETDEV_BONDING_FAILOVER like NETDEV_NOTIFY_PEERS 2011-04-17 23:36:03 -07:00