• Eric Dumazet's avatar
    net: hold rtnl again in dump callbacks · 2907c35f
    Eric Dumazet authored
    Commit e67f88dd (dont hold rtnl mutex during netlink dump callbacks)
    missed fact that rtnl_fill_ifinfo() must be called with rtnl held.
    
    Because of possible deadlocks between two mutexes (cb_mutex and rtnl),
    its not easy to solve this problem, so revert this part of the patch.
    
    It also forgot one rcu_read_unlock() in FIB dump_rules()
    
    Add one ASSERT_RTNL() in rtnl_fill_ifinfo() to remind us the rule.
    Signed-off-by: default avatarEric Dumazet <eric.dumazet@gmail.com>
    CC: Patrick McHardy <kaber@trash.net>
    CC: Stephen Hemminger <shemminger@vyatta.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    2907c35f
rtnetlink.c 47.7 KB