]> git.baikalelectronics.ru Git - kernel.git/commit
bonding: verify if we still have slaves in bond_3ad_unbind_slave()
authorVeaceslav Falico <vfalico@redhat.com>
Fri, 27 Sep 2013 13:10:58 +0000 (15:10 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sat, 28 Sep 2013 22:27:33 +0000 (15:27 -0700)
commit4a88e2ea9de07a75ca58df5a6935bb4163d88121
treed52cacdacaaf2410043fbb1425d82e8c416a9fa9
parentd624505e354317a321b6c68a89f5dc766d1fd65b
bonding: verify if we still have slaves in bond_3ad_unbind_slave()

After commit a07e4130d858d67977e67d18cca0fd6269b3198e ("bonding: populate
neighbour's private on enslave"), we've moved the unlinking of the slave
to the earliest position possible - so that nobody will see an
half-uninited slave.

However, bond_3ad_unbind_slave() relied that, even while removing the last
slave, it is still accessible - via __get_first_agg() (and, eventually,
bond_first_slave()).

Fix that by verifying if the aggregator return is an actual aggregator, but
not NULL.

CC: Jay Vosburgh <fubar@us.ibm.com>
CC: Andy Gospodarek <andy@greyhouse.net>
Signed-off-by: Veaceslav Falico <vfalico@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/bonding/bond_3ad.c