netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 0/2] bonding: fix 3ad slave (de)init
@ 2013-09-27 13:10 Veaceslav Falico
  2013-09-27 13:10 ` [PATCH net-next 1/2] bonding: correctly verify for the first slave in bond_enslave Veaceslav Falico
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Veaceslav Falico @ 2013-09-27 13:10 UTC (permalink / raw)
  To: netdev; +Cc: Jay Vosburgh, Andy Gospodarek, Veaceslav Falico

After 1f718f0f4f97145f4072d2d72dcf85069ca7226d ("bonding: populate
neighbour's private on enslave") the (de)linking of slaves in
bond_enslave/bond_release_one happens in the correct places - after we've
completely initialized the slave (for bond_enslave) and before we've even
began to de-init the slave (for bond_release_one, respectively).

This was done to prevent any RCU readers to see the half-initialized slave
(because the RCU readers aren't blocked by bond->lock or rtnl_lock
usually).

However, 802.3ad logic, in several places, relied on the fact that the
slave is still linked to the bond.

Fix it by correctly handling these cases - we shouldn't rely that the slave
is linked before fully initialized and, respectively, that the slave is
still linked while it's being removed.

CC: Jay Vosburgh <fubar@us.ibm.com>
CC: Andy Gospodarek <andy@greyhouse.net>
Signed-off-by: Veaceslav Falico <vfalico@redhat.com>

---
 drivers/net/bonding/bond_3ad.c  | 4 +++-
 drivers/net/bonding/bond_main.c | 2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-09-28 22:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-27 13:10 [PATCH net-next 0/2] bonding: fix 3ad slave (de)init Veaceslav Falico
2013-09-27 13:10 ` [PATCH net-next 1/2] bonding: correctly verify for the first slave in bond_enslave Veaceslav Falico
2013-09-27 13:10 ` [PATCH net-next 2/2] bonding: verify if we still have slaves in bond_3ad_unbind_slave() Veaceslav Falico
2013-09-28 22:28 ` [PATCH net-next 0/2] bonding: fix 3ad slave (de)init David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).