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
bond_3ad.h
bond_alb.c
bond_alb.h
bond_debugfs.c
bond_main.c bonding: fix error handling if slave is busy (v2) 2012-01-03 12:49:16 -05:00
bond_procfs.c
bond_sysfs.c bonding: Don't allow mode change via sysfs with slaves present 2011-11-17 19:31:54 -05:00
bonding.h
Makefile