• Sven Eckelmann's avatar
    batman-adv: Remove unnecessary hardif_list_lock · c3caf519
    Sven Eckelmann authored
    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: default avatarLinus Lüssing <linus.luessing@web.de>
    Signed-off-by: default avatarSven Eckelmann <sven@narfation.org>
    c3caf519
hard-interface.c 16.6 KB