From: Pavel 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 Acked-by: Serge Hallyn Signed-off-by: Andrew Morton --- kernel/nsproxy.c | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) diff -puN kernel/nsproxy.c~ipc-namespace-fix kernel/nsproxy.c --- a/kernel/nsproxy.c~ipc-namespace-fix +++ a/kernel/nsproxy.c @@ -123,7 +123,7 @@ out_uts: put_namespace(new_ns->namespace); out_ns: tsk->nsproxy = old_ns; - put_nsproxy(new_ns); + kfree(new_ns); goto out; } _