diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2007-10-27 01:56:12 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2007-10-27 01:56:12 -0400 |
commit | ceaa79c434044e40031585a65a4e45dc09322e8f (patch) | |
tree | b18dc0cdbebe096bf2a07149b6904b8b55d0502d /net | |
parent | 2b008b0a8e96b726c603c5e1a5a7a509b5f61e35 (diff) |
[NETNS]: Fix get_net_ns_by_pid
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>
Diffstat (limited to 'net')
-rw-r--r-- | net/core/rtnetlink.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c index 4a2640d38261..e1ba26fb4bf2 100644 --- a/net/core/rtnetlink.c +++ b/net/core/rtnetlink.c | |||
@@ -742,7 +742,7 @@ static struct net *get_net_ns_by_pid(pid_t pid) | |||
742 | /* Lookup the network namespace */ | 742 | /* Lookup the network namespace */ |
743 | net = ERR_PTR(-ESRCH); | 743 | net = ERR_PTR(-ESRCH); |
744 | rcu_read_lock(); | 744 | rcu_read_lock(); |
745 | tsk = find_task_by_pid(pid); | 745 | tsk = find_task_by_vpid(pid); |
746 | if (tsk) { | 746 | if (tsk) { |
747 | struct nsproxy *nsproxy; | 747 | struct nsproxy *nsproxy; |
748 | nsproxy = task_nsproxy(tsk); | 748 | nsproxy = task_nsproxy(tsk); |