• Johannes Berg's avatar
    netlink: update listeners directly when removing socket · b10dcb3b
    Johannes Berg authored
    The code is now confusing to read - first in one function down
    (netlink_remove) any group subscriptions are implicitly removed
    by calling __sk_del_bind_node(), but the subscriber database is
    only updated far later by calling netlink_update_listeners().
    
    Move the latter call to just after removal from the list so it
    is easier to follow the code.
    
    This also enables moving the locking inside the kernel-socket
    conditional, which improves the normal socket destruction path.
    Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    b10dcb3b
af_netlink.c 72.8 KB