aboutsummaryrefslogtreecommitdiffstats
path: root/fs/exec.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/exec.c')
-rw-r--r--fs/exec.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/fs/exec.c b/fs/exec.c
index e6e94c626c2c..029308754eea 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -19,7 +19,7 @@
19 * current->executable is only used by the procfs. This allows a dispatch 19 * current->executable is only used by the procfs. This allows a dispatch
20 * table to check for several different types of binary formats. We keep 20 * table to check for several different types of binary formats. We keep
21 * trying until we recognize the file or we run out of supported binary 21 * trying until we recognize the file or we run out of supported binary
22 * formats. 22 * formats.
23 */ 23 */
24 24
25#include <linux/slab.h> 25#include <linux/slab.h>
@@ -56,6 +56,8 @@
56#include <linux/fs_struct.h> 56#include <linux/fs_struct.h>
57#include <linux/pipe_fs_i.h> 57#include <linux/pipe_fs_i.h>
58 58
59#include <litmus/litmus.h>
60
59#include <asm/uaccess.h> 61#include <asm/uaccess.h>
60#include <asm/mmu_context.h> 62#include <asm/mmu_context.h>
61#include <asm/tlb.h> 63#include <asm/tlb.h>
@@ -79,7 +81,7 @@ int __register_binfmt(struct linux_binfmt * fmt, int insert)
79 insert ? list_add(&fmt->lh, &formats) : 81 insert ? list_add(&fmt->lh, &formats) :
80 list_add_tail(&fmt->lh, &formats); 82 list_add_tail(&fmt->lh, &formats);
81 write_unlock(&binfmt_lock); 83 write_unlock(&binfmt_lock);
82 return 0; 84 return 0;
83} 85}
84 86
85EXPORT_SYMBOL(__register_binfmt); 87EXPORT_SYMBOL(__register_binfmt);
@@ -1045,7 +1047,7 @@ void setup_new_exec(struct linux_binprm * bprm)
1045 group */ 1047 group */
1046 1048
1047 current->self_exec_id++; 1049 current->self_exec_id++;
1048 1050
1049 flush_signal_handlers(current, 0); 1051 flush_signal_handlers(current, 0);
1050 flush_old_files(current->files); 1052 flush_old_files(current->files);
1051} 1053}
@@ -1135,8 +1137,8 @@ int check_unsafe_exec(struct linux_binprm *bprm)
1135 return res; 1137 return res;
1136} 1138}
1137 1139
1138/* 1140/*
1139 * Fill the binprm structure from the inode. 1141 * Fill the binprm structure from the inode.
1140 * Check permissions, then read the first 128 (BINPRM_BUF_SIZE) bytes 1142 * Check permissions, then read the first 128 (BINPRM_BUF_SIZE) bytes
1141 * 1143 *
1142 * This may be called multiple times for binary chains (scripts for example). 1144 * This may be called multiple times for binary chains (scripts for example).
@@ -1348,6 +1350,7 @@ int do_execve(char * filename,
1348 goto out_unmark; 1350 goto out_unmark;
1349 1351
1350 sched_exec(); 1352 sched_exec();
1353 litmus_exec();
1351 1354
1352 bprm->file = file; 1355 bprm->file = file;
1353 bprm->filename = filename; 1356 bprm->filename = filename;