diff options
-rw-r--r-- | kernel/pid_namespace.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/pid_namespace.c b/kernel/pid_namespace.c index 3cc29b830e9e..0dbbc66b6ec6 100644 --- a/kernel/pid_namespace.c +++ b/kernel/pid_namespace.c | |||
@@ -146,6 +146,8 @@ struct pid_namespace *copy_pid_ns(unsigned long flags, | |||
146 | return get_pid_ns(old_ns); | 146 | return get_pid_ns(old_ns); |
147 | if (flags & (CLONE_THREAD|CLONE_PARENT)) | 147 | if (flags & (CLONE_THREAD|CLONE_PARENT)) |
148 | return ERR_PTR(-EINVAL); | 148 | return ERR_PTR(-EINVAL); |
149 | if (task_active_pid_ns(current) != old_ns) | ||
150 | return ERR_PTR(-EINVAL); | ||
149 | return create_pid_namespace(user_ns, old_ns); | 151 | return create_pid_namespace(user_ns, old_ns); |
150 | } | 152 | } |
151 | 153 | ||