aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorAndrea Bastoni <bastoni@cs.unc.edu>2009-12-17 21:33:26 -0500
committerAndrea Bastoni <bastoni@cs.unc.edu>2010-05-29 17:16:27 -0400
commitfa3c94fc9cd1619fe0dd6081a1a980c09ef3e119 (patch)
tree2e389b77431e55e8b81f4f256b93f23137dd4e2f /fs
parentf5936ecf0cff0b94419b6768efba3e15622beeb6 (diff)
[ported from 2008.3] Add File Descriptor Attached Shared Objects (FDSO) infrastructure
Diffstat (limited to 'fs')
-rw-r--r--fs/exec.c13
-rw-r--r--fs/inode.c2
2 files changed, 10 insertions, 5 deletions
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 @@
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>
@@ -57,6 +57,8 @@
57#include <linux/fs_struct.h> 57#include <linux/fs_struct.h>
58#include <linux/pipe_fs_i.h> 58#include <linux/pipe_fs_i.h>
59 59
60#include <litmus/litmus.h>
61
60#include <asm/uaccess.h> 62#include <asm/uaccess.h>
61#include <asm/mmu_context.h> 63#include <asm/mmu_context.h>
62#include <asm/tlb.h> 64#include <asm/tlb.h>
@@ -80,7 +82,7 @@ int __register_binfmt(struct linux_binfmt * fmt, int insert)
80 insert ? list_add(&fmt->lh, &formats) : 82 insert ? list_add(&fmt->lh, &formats) :
81 list_add_tail(&fmt->lh, &formats); 83 list_add_tail(&fmt->lh, &formats);
82 write_unlock(&binfmt_lock); 84 write_unlock(&binfmt_lock);
83 return 0; 85 return 0;
84} 86}
85 87
86EXPORT_SYMBOL(__register_binfmt); 88EXPORT_SYMBOL(__register_binfmt);
@@ -1006,7 +1008,7 @@ int flush_old_exec(struct linux_binprm * bprm)
1006 group */ 1008 group */
1007 1009
1008 current->self_exec_id++; 1010 current->self_exec_id++;
1009 1011
1010 flush_signal_handlers(current, 0); 1012 flush_signal_handlers(current, 0);
1011 flush_old_files(current->files); 1013 flush_old_files(current->files);
1012 1014
@@ -1102,8 +1104,8 @@ int check_unsafe_exec(struct linux_binprm *bprm)
1102 return res; 1104 return res;
1103} 1105}
1104 1106
1105/* 1107/*
1106 * Fill the binprm structure from the inode. 1108 * Fill the binprm structure from the inode.
1107 * Check permissions, then read the first 128 (BINPRM_BUF_SIZE) bytes 1109 * Check permissions, then read the first 128 (BINPRM_BUF_SIZE) bytes
1108 * 1110 *
1109 * This may be called multiple times for binary chains (scripts for example). 1111 * This may be called multiple times for binary chains (scripts for example).
@@ -1318,6 +1320,7 @@ int do_execve(char * filename,
1318 goto out_unmark; 1320 goto out_unmark;
1319 1321
1320 sched_exec(); 1322 sched_exec();
1323 litmus_exec();
1321 1324
1322 bprm->file = file; 1325 bprm->file = file;
1323 bprm->filename = filename; 1326 bprm->filename = filename;
diff --git a/fs/inode.c b/fs/inode.c
index 4d8e3be55976..de80bc2bf713 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -282,6 +282,8 @@ void inode_init_once(struct inode *inode)
282#ifdef CONFIG_FSNOTIFY 282#ifdef CONFIG_FSNOTIFY
283 INIT_HLIST_HEAD(&inode->i_fsnotify_mark_entries); 283 INIT_HLIST_HEAD(&inode->i_fsnotify_mark_entries);
284#endif 284#endif
285 INIT_LIST_HEAD(&inode->i_obj_list);
286 mutex_init(&inode->i_obj_mutex);
285} 287}
286EXPORT_SYMBOL(inode_init_once); 288EXPORT_SYMBOL(inode_init_once);
287 289