]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
[NETNS]: Fix get_net_ns_by_pid
authorEric W. Biederman <ebiederm@xmission.com>
Sat, 27 Oct 2007 05:56:12 +0000 (22:56 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sat, 27 Oct 2007 05:56:12 +0000 (22:56 -0700)
The pid namespace patches changed the semantics of
find_task_by_pid without breaking the compile resulting
in get_net_ns_by_pid doing the wrong thing.

So switch to using the intended find_task_by_vpid.

Combined with Denis' earlier patch to make netlink traffic
fully synchronous the inadvertent race I introduced with
accessing current is actually removed.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/rtnetlink.c

index 4a2640d3826166d98b066d626f9427e5daacc256..e1ba26fb4bf28052fd0150f08ed5d6eaa057fa19 100644 (file)
@@ -742,7 +742,7 @@ 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) {
                struct nsproxy *nsproxy;
                nsproxy = task_nsproxy(tsk);