• D
    [NET]: rtnl_unlock cleanups · 1536cc0d
    Denis V. Lunev 提交于
    There is no need to process outstanding netlink user->kernel packets
    during rtnl_unlock now. There is no rtnl_trylock in the rtnetlink_rcv
    anymore.
    
    Normal code path is the following:
    netlink_sendmsg
       netlink_unicast
           netlink_sendskb
               skb_queue_tail
               netlink_data_ready
                   rtnetlink_rcv
                       mutex_lock(&rtnl_mutex);
                       netlink_run_queue(sk, qlen, &rtnetlink_rcv_msg);
                       mutex_unlock(&rtnl_mutex);
    
    So, it is possible, that packets can be present in the rtnl->sk_receive_queue
    during rtnl_unlock, but there is no need to process them at that moment as
    rtnetlink_rcv for that packet is pending.
    Signed-off-by: NDenis V. Lunev <den@openvz.org>
    Acked-by: NAlexey Kuznetsov <kuznet@ms2.inr.ac.ru>
    Signed-off-by: NDavid S. Miller <davem@davemloft.net>
    1536cc0d
rtnetlink.c 32.8 KB