]> git.karo-electronics.de Git - karo-tx-linux.git/commit
namespaces, pid_ns: fix leakage on fork() failure
authorMike Galbraith <efault@gmx.de>
Thu, 3 May 2012 05:43:10 +0000 (15:43 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 3 May 2012 05:46:11 +0000 (15:46 +1000)
commitb4665b2fce0c7a4e5328da6aec1cc72e2872a178
tree2693c4a674856d3dc282cf9286b2569017ac748e
parent5420d64868068774a2c117091180cadbf8e1a1e2
namespaces, pid_ns: fix leakage on fork() failure

Fork() failure post namespace creation for a child cloned with
CLONE_NEWPID leaks pid_namespace/mnt_cache due to proc being mounted
during creation, but not unmounted during cleanup.  Call
pid_ns_release_proc() during cleanup.

Signed-off-by: Mike Galbraith <efault@gmx.de>
Acked-by: Oleg Nesterov <oleg@redhat.com>
Reviewed-by: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Pavel Emelyanov <xemul@parallels.com>
Cc: Cyrill Gorcunov <gorcunov@openvz.org>
Cc: Louis Rilling <louis.rilling@kerlabs.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
kernel/fork.c