Commit 5d124e99 authored by Pavel's avatar Pavel Committed by Linus Torvalds
Browse files

[PATCH] nsproxy cloning error path fix

This patch fixes copy_namespaces()'s error path.

when new nsproxy (new_ns) is created pointers to namespaces (ipc, uts) are
copied from the old nsproxy.  Later in copy_utsname, copy_ipcs, etc.
according namespaces are get-ed.  On error path needed namespaces are
put-ed, so there's no need to put new nsproxy itelf as it woud cause
putting namespaces for the second time.

Found when incorporating namespaces into OpenVZ kernel.
Signed-off-by: default avatarPavel Emelianov <>
Acked-by: default avatarSerge Hallyn <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent fcfbd547
......@@ -123,7 +123,7 @@ out_uts:
tsk->nsproxy = old_ns;
goto out;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment