netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 0/3] bonding: Fix RTNL: assertion failed at net/core/rtnetlink.c
@ 2014-02-17  8:35 Ding Tianhong
  2014-02-17  8:35 ` [PATCH net-next 1/3] bonding: add bond_set_slave_state/flags() Ding Tianhong
                   ` (4 more replies)
  0 siblings, 5 replies; 12+ messages in thread
From: Ding Tianhong @ 2014-02-17  8:35 UTC (permalink / raw)
  To: fubar, vfalico, andy
  Cc: cwang, jiri, thomas, eric.dumazet, sfeldma, davem, netdev

The problem was introduced by the commit 1d3ee88ae0d
(bonding: add netlink attributes to slave link dev).
The bond_set_active_slave() and bond_set_backup_slave()
will use rtmsg_ifinfo to send slave's states, so these
two functions should be called in RTNL.

In 802.3ad mode, acquiring RTNL for the __enable_port and
__disable_port cases is difficult, as those calls generally
already hold the state machine lock, and cannot unconditionally
call rtnl_lock because either they already hold RTNL (for calls
via bond_3ad_unbind_slave) or due to the potential for deadlock
with bond_3ad_adapter_speed_changed, bond_3ad_adapter_duplex_changed,
bond_3ad_link_change, or bond_3ad_update_lacp_rate.  All four of
those are called with RTNL held, and acquire the state machine lock
second.  The calling contexts for __enable_port and __disable_port
already hold the state machine lock, and may or may not need RTNL.

According to the Jay's opinion, I don't think it is a problem that
the slave don't send notify message synchronously when the status
changed, normally the state machine is running every 100 ms, send
the notify message at the end of the state machine if the slave's
state changed should be better.

Ding Tianhong (3):
  bonding: add bond_set_slave_state/flags()
  bonding: add new slave param and  bond_slave_state_notify()
  bonding: Fix the RTNL assertion failed for 802.3ad state machine

 drivers/net/bonding/bond_3ad.c |  5 ++--
 drivers/net/bonding/bonding.h  | 68 +++++++++++++++++++++++++++++++++++++++++-
 2 files changed, 70 insertions(+), 3 deletions(-)

-- 
1.8.0

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

end of thread, other threads:[~2014-02-18  3:54 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-17  8:35 [PATCH net-next 0/3] bonding: Fix RTNL: assertion failed at net/core/rtnetlink.c Ding Tianhong
2014-02-17  8:35 ` [PATCH net-next 1/3] bonding: add bond_set_slave_state/flags() Ding Tianhong
2014-02-18  2:08   ` Jay Vosburgh
2014-02-18  3:50     ` Ding Tianhong
2014-02-17  8:35 ` [PATCH net-next 2/3] bonding: add new slave param and bond_slave_state_notify() Ding Tianhong
2014-02-18  2:07   ` Jay Vosburgh
2014-02-18  3:49     ` Ding Tianhong
2014-02-17  8:35 ` [PATCH net-next 3/3] bonding: Fix the RTNL assertion failed for 802.3ad state machine Ding Tianhong
2014-02-18  2:06   ` Jay Vosburgh
2014-02-18  3:47     ` Ding Tianhong
2014-02-17 14:06 ` [PATCH net-next 0/3] bonding: Fix RTNL: assertion failed at net/core/rtnetlink.c Thomas Glanzmann
2014-02-17 21:36 ` 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).