]> git.karo-electronics.de Git - karo-tx-linux.git/commit
namespaces, pid_ns: fix leakage on fork() failure
authorMike Galbraith <efault@gmx.de>
Thu, 10 May 2012 20:01:45 +0000 (13:01 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 21 May 2012 17:46:17 +0000 (10:46 -0700)
commit406c7d0dfa49cba7ee87584fec108bd422a59d5e
tree16c146a208db08d87c2cf77671f9052af40ed1a2
parentbdce491491d3e9e9b647b24ab4928561d2a6434a
namespaces, pid_ns: fix leakage on fork() failure

commit 5e2bf0142231194d36fdc9596b36a261ed2b9fe7 upstream.

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>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kernel/fork.c