summaryrefslogtreecommitdiffstats
path: root/kernel/fork.c
diff options
context:
space:
mode:
authorAl Viro2008-04-22 11:11:59 +0200
committerAl Viro2008-04-25 15:23:53 +0200
commitfd8328be874f4190a811c58cd4778ec2c74d2c05 (patch)
treeb44ae8e99ce96a1a4739b04d4d1a23c40ab8b163 /kernel/fork.c
parent[PATCH] close race in unshare_files() (diff)
downloadkernel-qcow2-linux-fd8328be874f4190a811c58cd4778ec2c74d2c05.tar.gz
kernel-qcow2-linux-fd8328be874f4190a811c58cd4778ec2c74d2c05.tar.xz
kernel-qcow2-linux-fd8328be874f4190a811c58cd4778ec2c74d2c05.zip
[PATCH] sanitize handling of shared descriptor tables in failing execve()
* unshare_files() can fail; doing it after irreversible actions is wrong and de_thread() is certainly irreversible. * since we do it unconditionally anyway, we might as well do it in do_execve() and save ourselves the PITA in binfmt handlers, etc. * while we are at it, binfmt_som actually leaked files_struct on failure. As a side benefit, unshare_files(), put_files_struct() and reset_files_struct() become unexported. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'kernel/fork.c')
-rw-r--r--kernel/fork.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/kernel/fork.c b/kernel/fork.c
index 76f05a08062b..2fc11f2e2b21 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -870,8 +870,6 @@ int unshare_files(void)
return error;
}
-EXPORT_SYMBOL(unshare_files);
-
static int copy_sighand(unsigned long clone_flags, struct task_struct *tsk)
{
struct sighand_struct *sig;