summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'kernel')
-rw-r--r--kernel/nsproxy.c2
-rw-r--r--kernel/pid.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/kernel/nsproxy.c b/kernel/nsproxy.c
index ac99837e7a04..e981c61304f1 100644
--- a/kernel/nsproxy.c
+++ b/kernel/nsproxy.c
@@ -87,7 +87,7 @@ static struct nsproxy *create_new_namespaces(unsigned long flags,
goto out_ipc;
}
- new_nsp->pid_ns = copy_pid_ns(flags, tsk->nsproxy->pid_ns);
+ new_nsp->pid_ns = copy_pid_ns(flags, task_active_pid_ns(tsk));
if (IS_ERR(new_nsp->pid_ns)) {
err = PTR_ERR(new_nsp->pid_ns);
goto out_pid;
diff --git a/kernel/pid.c b/kernel/pid.c
index 42de9af8c524..78c0dbffde65 100644
--- a/kernel/pid.c
+++ b/kernel/pid.c
@@ -214,7 +214,7 @@ struct pid *alloc_pid(void)
int nr = -1;
struct pid_namespace *ns;
- ns = current->nsproxy->pid_ns;
+ ns = task_active_pid_ns(current);
pid = kmem_cache_alloc(ns->pid_cachep, GFP_KERNEL);
if (!pid)
goto out;
@@ -364,7 +364,7 @@ struct pid *find_ge_pid(int nr)
pid = find_pid(nr);
if (pid)
break;
- nr = next_pidmap(current->nsproxy->pid_ns, nr);
+ nr = next_pidmap(task_active_pid_ns(current), nr);
} while (nr > 0);
return pid;