• Florian Westphal's avatar
    net: core: rcu-ify rtnl af_ops · 5fa85a09
    Florian Westphal authored
    rtnl af_ops currently rely on rtnl mutex: unregister (called from module
    exit functions) takes the rtnl mutex and all users that do af_ops lookup
    also take the rtnl mutex. IOW, parallel rmmod will block until doit()
    callback is done.
    
    As none of the af_ops implementation sleep we can use rcu instead.
    
    doit functions that need the af_ops can now use rcu instead of the
    rtnl mutex provided the mutex isn't needed for other reasons.
    Signed-off-by: default avatarFlorian Westphal <fw@strlen.de>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    5fa85a09
devinet.c 62 KB