aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-05-19 19:37:45 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-05-19 19:37:45 -0400
commite23a5f66877d32f21a2ac15a200ad4a2b4c8b0ee (patch)
treef1eafaf4796abd3289fdc3384f124046f752b9d6 /include
parentc9091f9e571386992c8c5badcec84d49753b9df1 (diff)
parente9baf6e59842285bcf9570f5094e4c27674a0f7c (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: [PATCH] return to old errno choice in mkdir() et.al. [Patch] fs/binfmt_elf.c: fix wrong return values [PATCH] get rid of leak in compat_execve() [Patch] fs/binfmt_elf.c: fix a wrong free [PATCH] avoid multiplication overflows and signedness issues for max_fds [PATCH] dup_fd() part 4 - race fix [PATCH] dup_fd() - part 3 [PATCH] dup_fd() part 2 [PATCH] dup_fd() fixes, part 1 [PATCH] take init_files to fs/file.c
Diffstat (limited to 'include')
-rw-r--r--include/linux/binfmts.h1
-rw-r--r--include/linux/fdtable.h1
-rw-r--r--include/linux/init_task.h23
3 files changed, 3 insertions, 22 deletions
diff --git a/include/linux/binfmts.h b/include/linux/binfmts.h
index b512e48f6d8e..ee0ed48e8348 100644
--- a/include/linux/binfmts.h
+++ b/include/linux/binfmts.h
@@ -99,6 +99,7 @@ extern int copy_strings_kernel(int argc,char ** argv,struct linux_binprm *bprm);
99extern void compute_creds(struct linux_binprm *binprm); 99extern void compute_creds(struct linux_binprm *binprm);
100extern int do_coredump(long signr, int exit_code, struct pt_regs * regs); 100extern int do_coredump(long signr, int exit_code, struct pt_regs * regs);
101extern int set_binfmt(struct linux_binfmt *new); 101extern int set_binfmt(struct linux_binfmt *new);
102extern void free_bprm(struct linux_binprm *);
102 103
103#endif /* __KERNEL__ */ 104#endif /* __KERNEL__ */
104#endif /* _LINUX_BINFMTS_H */ 105#endif /* _LINUX_BINFMTS_H */
diff --git a/include/linux/fdtable.h b/include/linux/fdtable.h
index a118f3c0b240..4aab6f12cfab 100644
--- a/include/linux/fdtable.h
+++ b/include/linux/fdtable.h
@@ -93,6 +93,7 @@ struct files_struct *get_files_struct(struct task_struct *);
93void put_files_struct(struct files_struct *fs); 93void put_files_struct(struct files_struct *fs);
94void reset_files_struct(struct files_struct *); 94void reset_files_struct(struct files_struct *);
95int unshare_files(struct files_struct **); 95int unshare_files(struct files_struct **);
96struct files_struct *dup_fd(struct files_struct *, int *);
96 97
97extern struct kmem_cache *files_cachep; 98extern struct kmem_cache *files_cachep;
98 99
diff --git a/include/linux/init_task.h b/include/linux/init_task.h
index b24c2875aa05..9927a88674a3 100644
--- a/include/linux/init_task.h
+++ b/include/linux/init_task.h
@@ -1,7 +1,6 @@
1#ifndef _LINUX__INIT_TASK_H 1#ifndef _LINUX__INIT_TASK_H
2#define _LINUX__INIT_TASK_H 2#define _LINUX__INIT_TASK_H
3 3
4#include <linux/fdtable.h>
5#include <linux/rcupdate.h> 4#include <linux/rcupdate.h>
6#include <linux/irqflags.h> 5#include <linux/irqflags.h>
7#include <linux/utsname.h> 6#include <linux/utsname.h>
@@ -12,27 +11,7 @@
12#include <linux/securebits.h> 11#include <linux/securebits.h>
13#include <net/net_namespace.h> 12#include <net/net_namespace.h>
14 13
15#define INIT_FDTABLE \ 14extern struct files_struct init_files;
16{ \
17 .max_fds = NR_OPEN_DEFAULT, \
18 .fd = &init_files.fd_array[0], \
19 .close_on_exec = (fd_set *)&init_files.close_on_exec_init, \
20 .open_fds = (fd_set *)&init_files.open_fds_init, \
21 .rcu = RCU_HEAD_INIT, \
22 .next = NULL, \
23}
24
25#define INIT_FILES \
26{ \
27 .count = ATOMIC_INIT(1), \
28 .fdt = &init_files.fdtab, \
29 .fdtab = INIT_FDTABLE, \
30 .file_lock = __SPIN_LOCK_UNLOCKED(init_task.file_lock), \
31 .next_fd = 0, \
32 .close_on_exec_init = { { 0, } }, \
33 .open_fds_init = { { 0, } }, \
34 .fd_array = { NULL, } \
35}
36 15
37#define INIT_KIOCTX(name, which_mm) \ 16#define INIT_KIOCTX(name, which_mm) \
38{ \ 17{ \