Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=1536cc0d55a2820b71daf912060fe43ec15630c2
Commit:     1536cc0d55a2820b71daf912060fe43ec15630c2
Parent:     d1ec3b772233826bf156284170632563790dbabf
Author:     Denis V. Lunev <[EMAIL PROTECTED]>
AuthorDate: Wed Oct 10 21:12:58 2007 -0700
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Wed Oct 10 21:12:58 2007 -0700

    [NET]: rtnl_unlock cleanups
    
    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: Denis V. Lunev <[EMAIL PROTECTED]>
    Acked-by: Alexey Kuznetsov <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 net/core/rtnetlink.c |    8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index 739fbad..471d2d9 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -75,8 +75,6 @@ void __rtnl_unlock(void)
 void rtnl_unlock(void)
 {
        mutex_unlock(&rtnl_mutex);
-       if (rtnl && rtnl->sk_receive_queue.qlen)
-               rtnl->sk_data_ready(rtnl, 0);
        netdev_run_todo();
 }
 
@@ -1319,11 +1317,9 @@ static void rtnetlink_rcv(struct sock *sk, int len)
        unsigned int qlen = 0;
 
        do {
-               mutex_lock(&rtnl_mutex);
+               rtnl_lock();
                qlen = netlink_run_queue(sk, qlen, &rtnetlink_rcv_msg);
-               mutex_unlock(&rtnl_mutex);
-
-               netdev_run_todo();
+               rtnl_unlock();
        } while (qlen);
 }
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to