aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorPavel <xemul@openvz.org>2006-10-02 05:18:24 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-02 10:57:22 -0400
commit5d124e99c2fee1c8f3020ecb0dff8d5617ee7991 (patch)
tree63a0226278175a8d30d7ff5803421cafea2b2813 /kernel
parentfcfbd547b1209aae9d880fe5db33464413925cc8 (diff)
[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: Pavel Emelianov <xemul@openvz.org> Acked-by: Serge Hallyn <serue@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/nsproxy.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/nsproxy.c b/kernel/nsproxy.c
index 8d6c852dc51e..6ebdb82a0ce4 100644
--- a/kernel/nsproxy.c
+++ b/kernel/nsproxy.c
@@ -123,7 +123,7 @@ out_uts:
123 put_namespace(new_ns->namespace); 123 put_namespace(new_ns->namespace);
124out_ns: 124out_ns:
125 tsk->nsproxy = old_ns; 125 tsk->nsproxy = old_ns;
126 put_nsproxy(new_ns); 126 kfree(new_ns);
127 goto out; 127 goto out;
128} 128}
129 129