aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc64/kernel/binfmt_aout32.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sparc64/kernel/binfmt_aout32.c')
-rw-r--r--arch/sparc64/kernel/binfmt_aout32.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/arch/sparc64/kernel/binfmt_aout32.c b/arch/sparc64/kernel/binfmt_aout32.c
index c8acbeab49b4..92c1b36a2e16 100644
--- a/arch/sparc64/kernel/binfmt_aout32.c
+++ b/arch/sparc64/kernel/binfmt_aout32.c
@@ -35,7 +35,7 @@
35 35
36static int load_aout32_binary(struct linux_binprm *, struct pt_regs * regs); 36static int load_aout32_binary(struct linux_binprm *, struct pt_regs * regs);
37static int load_aout32_library(struct file*); 37static int load_aout32_library(struct file*);
38static int aout32_core_dump(long signr, struct pt_regs * regs, struct file *file); 38static int aout32_core_dump(long signr, struct pt_regs *regs, struct file *file, unsigned long limit);
39 39
40static struct linux_binfmt aout32_format = { 40static struct linux_binfmt aout32_format = {
41 .module = THIS_MODULE, 41 .module = THIS_MODULE,
@@ -86,7 +86,7 @@ if (file->f_op->llseek) { \
86 * dumping of the process results in another error.. 86 * dumping of the process results in another error..
87 */ 87 */
88 88
89static int aout32_core_dump(long signr, struct pt_regs *regs, struct file *file) 89static int aout32_core_dump(long signr, struct pt_regs *regs, struct file *file, unsigned long limit)
90{ 90{
91 mm_segment_t fs; 91 mm_segment_t fs;
92 int has_dumped = 0; 92 int has_dumped = 0;
@@ -105,13 +105,11 @@ static int aout32_core_dump(long signr, struct pt_regs *regs, struct file *file)
105 105
106/* If the size of the dump file exceeds the rlimit, then see what would happen 106/* If the size of the dump file exceeds the rlimit, then see what would happen
107 if we wrote the stack, but not the data area. */ 107 if we wrote the stack, but not the data area. */
108 if ((dump.u_dsize+dump.u_ssize) > 108 if (dump.u_dsize + dump.u_ssize > limit)
109 current->signal->rlim[RLIMIT_CORE].rlim_cur)
110 dump.u_dsize = 0; 109 dump.u_dsize = 0;
111 110
112/* Make sure we have enough room to write the stack and data areas. */ 111/* Make sure we have enough room to write the stack and data areas. */
113 if ((dump.u_ssize) > 112 if (dump.u_ssize > limit)
114 current->signal->rlim[RLIMIT_CORE].rlim_cur)
115 dump.u_ssize = 0; 113 dump.u_ssize = 0;
116 114
117/* make sure we actually have a data and stack area to dump */ 115/* make sure we actually have a data and stack area to dump */