X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=net%2Fcore%2Frtnetlink.c;h=e1ba26fb4bf28052fd0150f08ed5d6eaa057fa19;hb=a2508c0814c6d2c0259fa859a6184343b1e39ea3;hp=739fbad15c6a7c5046ddcf1452f34a717e127ff4;hpb=0cfad07555312468296ea3bbbcdf99038f58678b;p=linux-2.6-omap-h63xx.git diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c index 739fbad15c6..e1ba26fb4bf 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(); } @@ -744,12 +742,12 @@ static struct net *get_net_ns_by_pid(pid_t pid) /* Lookup the network namespace */ net = ERR_PTR(-ESRCH); rcu_read_lock(); - tsk = find_task_by_pid(pid); + tsk = find_task_by_vpid(pid); if (tsk) { - task_lock(tsk); - if (tsk->nsproxy) - net = get_net(tsk->nsproxy->net_ns); - task_unlock(tsk); + struct nsproxy *nsproxy; + nsproxy = task_nsproxy(tsk); + if (nsproxy) + net = get_net(nsproxy->net_ns); } rcu_read_unlock(); return net; @@ -1314,17 +1312,11 @@ static int rtnetlink_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh) return doit(skb, nlh, (void *)&rta_buf[0]); } -static void rtnetlink_rcv(struct sock *sk, int len) +static void rtnetlink_rcv(struct sk_buff *skb) { - unsigned int qlen = 0; - - do { - mutex_lock(&rtnl_mutex); - qlen = netlink_run_queue(sk, qlen, &rtnetlink_rcv_msg); - mutex_unlock(&rtnl_mutex); - - netdev_run_todo(); - } while (qlen); + rtnl_lock(); + netlink_rcv_skb(skb, &rtnetlink_rcv_msg); + rtnl_unlock(); } static int rtnetlink_event(struct notifier_block *this, unsigned long event, void *ptr)