netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 0/2] bonding: fix enslaving a dev without mtu setting support
@ 2014-05-21 15:41 Veaceslav Falico
  2014-05-21 15:42 ` [PATCH net-next 1/2] bonding: populate essential new_slave->bond/dev early Veaceslav Falico
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Veaceslav Falico @ 2014-05-21 15:41 UTC (permalink / raw)
  To: netdev; +Cc: Jay Vosburgh, Andy Gospodarek, Veaceslav Falico

Hi,

With the introduction of bond_free_slave() we need to have slave->bond
populated before calling it, however if the dev_mtu_set(slave, mtu) fails,
we call bond_free_slave() before actually setting slave->bond, and thus
we'll panic.

Fix this by populating slave->bond (and ->dev, it seems appropriate) as
early as possible.

Also, remove a harmful check for NULL in bond_get_bond_by_slave(), as it's
only hiding the real problem and making it harder to debug.

CC: Jay Vosburgh <j.vosburgh@gmail.com>
CC: Andy Gospodarek <andy@greyhouse.net>
CC: netdev@vger.kernel.org
Signed-off-by: Veaceslav Falico <vfalico@gmail.com>

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

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

end of thread, other threads:[~2014-05-22 19:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-21 15:41 [PATCH net-next 0/2] bonding: fix enslaving a dev without mtu setting support Veaceslav Falico
2014-05-21 15:42 ` [PATCH net-next 1/2] bonding: populate essential new_slave->bond/dev early Veaceslav Falico
2014-05-22  2:23   ` Ding Tianhong
2014-05-21 15:42 ` [PATCH net-next 2/2] bonding: remove NULL verification from bond_get_bond_by_slave() Veaceslav Falico
2014-05-22 19:47 ` [PATCH net-next 0/2] bonding: fix enslaving a dev without mtu setting support 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).