From fa3c94fc9cd1619fe0dd6081a1a980c09ef3e119 Mon Sep 17 00:00:00 2001 From: Andrea Bastoni Date: Thu, 17 Dec 2009 21:33:26 -0500 Subject: [ported from 2008.3] Add File Descriptor Attached Shared Objects (FDSO) infrastructure --- fs/exec.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'fs/exec.c') diff --git a/fs/exec.c b/fs/exec.c index ba112bd4a339..606cf96828d5 100644 --- a/fs/exec.c +++ b/fs/exec.c @@ -19,7 +19,7 @@ * current->executable is only used by the procfs. This allows a dispatch * table to check for several different types of binary formats. We keep * trying until we recognize the file or we run out of supported binary - * formats. + * formats. */ #include @@ -57,6 +57,8 @@ #include #include +#include + #include #include #include @@ -80,7 +82,7 @@ int __register_binfmt(struct linux_binfmt * fmt, int insert) insert ? list_add(&fmt->lh, &formats) : list_add_tail(&fmt->lh, &formats); write_unlock(&binfmt_lock); - return 0; + return 0; } EXPORT_SYMBOL(__register_binfmt); @@ -1006,7 +1008,7 @@ int flush_old_exec(struct linux_binprm * bprm) group */ current->self_exec_id++; - + flush_signal_handlers(current, 0); flush_old_files(current->files); @@ -1102,8 +1104,8 @@ int check_unsafe_exec(struct linux_binprm *bprm) return res; } -/* - * Fill the binprm structure from the inode. +/* + * Fill the binprm structure from the inode. * Check permissions, then read the first 128 (BINPRM_BUF_SIZE) bytes * * This may be called multiple times for binary chains (scripts for example). @@ -1318,6 +1320,7 @@ int do_execve(char * filename, goto out_unmark; sched_exec(); + litmus_exec(); bprm->file = file; bprm->filename = filename; -- cgit v1.2.2