1 Jan 2012 01:09
Re: [PATCH] bonding: fix error handling if slave is busy (v2)
Nicolas de Pesloüan <nicolas.2p.debian <at> gmail.com>
2012-01-01 00:09:50 GMT
2012-01-01 00:09:50 GMT
Le 01/01/2012 00:26, Stephen Hemminger a écrit : > 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 <at> vyatta.com> Thanks Stephen. Reviewed-by: Nicolas de Pesloüan <nicolas.2p.debian <at> free.fr> > --- > v2 - need to keep original err_close for other unwind > > --- a/drivers/net/bonding/bond_main.c 2011-12-30 14:20:03.171823181 -0800 > +++ b/drivers/net/bonding/bond_main.c 2011-12-31 15:20:16.493379415 -0800 > <at> <at> -1822,7 +1822,7 <at> <at> int bond_enslave(struct net_device *bond > "but new slave device does not support netpoll.\n", > bond_dev->name); > res = -EBUSY; > - goto err_close;(Continue reading)
RSS Feed