From: Alex Kelly Date: Fri, 7 Sep 2012 00:25:06 +0000 (+1000) Subject: coredump: update coredump-related headers X-Git-Tag: next-20120907~1^2~26 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=73e11a7d66e19d30898fb354e5a766f0d05e8f93;p=karo-tx-linux.git coredump: update coredump-related headers Create a new header file, fs/coredump.h, which contains functions only used by the new coredump.c. It also moves do_coredump to the include/linux/coredump.h header file, for consistency. Signed-off-by: Alex Kelly Reviewed-by: Josh Triplett Acked-by: Serge Hallyn Acked-by: Kees Cook Signed-off-by: Andrew Morton --- diff --git a/fs/coredump.c b/fs/coredump.c index 9692329f20b4..1935b4db4cb8 100644 --- a/fs/coredump.c +++ b/fs/coredump.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include @@ -39,6 +40,7 @@ #include #include "internal.h" +#include "coredump.h" #include diff --git a/fs/coredump.h b/fs/coredump.h new file mode 100644 index 000000000000..e39ff072110d --- /dev/null +++ b/fs/coredump.h @@ -0,0 +1,6 @@ +#ifndef _FS_COREDUMP_H +#define _FS_COREDUMP_H + +extern int __get_dumpable(unsigned long mm_flags); + +#endif diff --git a/fs/exec.c b/fs/exec.c index dce92e2476b5..0065286baaaa 100644 --- a/fs/exec.c +++ b/fs/exec.c @@ -62,6 +62,7 @@ #include #include "internal.h" +#include "coredump.h" #include diff --git a/include/linux/binfmts.h b/include/linux/binfmts.h index 19b811ebdc01..52fb2eb306ff 100644 --- a/include/linux/binfmts.h +++ b/include/linux/binfmts.h @@ -134,11 +134,6 @@ extern int copy_strings_kernel(int argc, const char *const *argv, struct linux_binprm *bprm); extern int prepare_bprm_creds(struct linux_binprm *bprm); extern void install_exec_creds(struct linux_binprm *bprm); -#ifdef CONFIG_COREDUMP -extern void do_coredump(long signr, int exit_code, struct pt_regs *regs); -#else -static inline void do_coredump(long signr, int exit_code, struct pt_regs *regs) {} -#endif extern void set_binfmt(struct linux_binfmt *new); extern void free_bprm(struct linux_binprm *); diff --git a/include/linux/coredump.h b/include/linux/coredump.h index ba4b85a6d9b8..42f9752a0a40 100644 --- a/include/linux/coredump.h +++ b/include/linux/coredump.h @@ -11,5 +11,10 @@ */ extern int dump_write(struct file *file, const void *addr, int nr); extern int dump_seek(struct file *file, loff_t off); +#ifdef CONFIG_COREDUMP +extern void do_coredump(long signr, int exit_code, struct pt_regs *regs); +#else +static inline void do_coredump(long signr, int exit_code, struct pt_regs *regs) {} +#endif #endif /* _LINUX_COREDUMP_H */ diff --git a/include/linux/sched.h b/include/linux/sched.h index 2bed93741df1..5e9f1d832ecf 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -405,7 +405,6 @@ static inline void arch_pick_mmap_layout(struct mm_struct *mm) {} extern void set_dumpable(struct mm_struct *mm, int value); extern int get_dumpable(struct mm_struct *mm); -extern int __get_dumpable(unsigned long mm_flags); /* get/set_dumpable() values */ #define SUID_DUMPABLE_DISABLED 0 diff --git a/kernel/signal.c b/kernel/signal.c index be4f856d52f8..fb4fd727dc9b 100644 --- a/kernel/signal.c +++ b/kernel/signal.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include