• Kuniyuki Iwashima's avatar
    af_unix: Remove U_LOCK_DIAG. · c4da4661
    Kuniyuki Iwashima authored
    sk_diag_dump_icons() acquires embryo's lock by unix_state_lock_nested()
    to fetch its peer.
    
    The embryo's ->peer is set to NULL only when its parent listener is
    close()d.  Then, unix_release_sock() is called for each embryo after
    unlinking skb by skb_dequeue().
    
    In sk_diag_dump_icons(), we hold the parent's recvq lock, so we need
    not acquire unix_state_lock_nested(), and peer is always non-NULL.
    
    Let's remove unnecessary unix_state_lock_nested() and non-NULL test
    for peer.
    Signed-off-by: default avatarKuniyuki Iwashima <kuniyu@amazon.com>
    Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
    c4da4661
diag.c 7.21 KB