* [PATCH] netns: Fix get_net_ns_by_pid
@ 2007-10-26 23:29 Eric W. Biederman
2007-10-27 5:56 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Eric W. Biederman @ 2007-10-26 23:29 UTC (permalink / raw)
To: David Miller
Cc: netdev, Linux Containers, Denis V. Lunev, Benjamin Thery,
Daniel Lezcano
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>
---
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 4a2640d..e1ba26f 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)
/* 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);
--
1.5.3.rc6.17.g1911
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] netns: Fix get_net_ns_by_pid
2007-10-26 23:29 [PATCH] netns: Fix get_net_ns_by_pid Eric W. Biederman
@ 2007-10-27 5:56 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2007-10-27 5:56 UTC (permalink / raw)
To: ebiederm; +Cc: netdev, containers, dlunev, benjamin.thery, dlezcano
From: ebiederm@xmission.com (Eric W. Biederman)
Date: Fri, 26 Oct 2007 17:29:41 -0600
>
> 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>
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-10-27 5:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-26 23:29 [PATCH] netns: Fix get_net_ns_by_pid Eric W. Biederman
2007-10-27 5:56 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox