1. 08 5月, 2011 2 次提交
    • S
      batman-adv: Avoid deadlock between rtnl_lock and s_active · 3a4375a9
      Sven Eckelmann 提交于
      The hard_if_event is called by the notifier with rtnl_lock and tries to
      remove sysfs entries when a NETDEV_UNREGISTER event is received. This
      will automatically take the s_active lock.
      
      The s_active lock is also used when a new interface is added to a meshif
      through sysfs. In that situation we cannot wait for the rntl_lock before
      creating the actual batman-adv interface to prevent a deadlock. It is
      still possible to try to get the rtnl_lock and immediately abort the
      current operation when the trylock call failed.
      Signed-off-by: NSven Eckelmann <sven@narfation.org>
      3a4375a9
    • S
      batman-adv: Remove unnecessary hardif_list_lock · c3caf519
      Sven Eckelmann 提交于
      hardif_list_lock is unneccessary because we already ensure that no
      multiple admin operations can take place through rtnl_lock.
      hardif_list_lock only adds additional overhead and complexity.
      
      Critical functions now check whether they are called with rtnl_lock
      using ASSERT_RTNL.
      
      It indirectly fixes the problem that orig_hash_del_if() expects that
      only one interface is deleted from hardif_list at a time, but
      hardif_remove_interfaces() removes all at once and then calls
      orig_hash_del_if().
      Reported-by: NLinus Lüssing <linus.luessing@web.de>
      Signed-off-by: NSven Eckelmann <sven@narfation.org>
      c3caf519
  2. 05 3月, 2011 2 次提交
  3. 31 1月, 2011 1 次提交
  4. 17 12月, 2010 1 次提交