]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/sparc64/kernel/binfmt_aout32.c
Merge branch 'sg' of git://git.kernel.dk/linux-2.6-block
[linux-2.6-omap-h63xx.git] / arch / sparc64 / kernel / binfmt_aout32.c
index d208cc7804f234583fc8e457f871a96610dfede6..92c1b36a2e16bee668aa11fd414243d8ad0028f2 100644 (file)
 
 static int load_aout32_binary(struct linux_binprm *, struct pt_regs * regs);
 static int load_aout32_library(struct file*);
-static int aout32_core_dump(long signr, struct pt_regs * regs, struct file *file);
+static int aout32_core_dump(long signr, struct pt_regs *regs, struct file *file, unsigned long limit);
 
 static struct linux_binfmt aout32_format = {
-       NULL, THIS_MODULE, load_aout32_binary, load_aout32_library, aout32_core_dump,
-       PAGE_SIZE
+       .module         = THIS_MODULE,
+       .load_binary    = load_aout32_binary,
+       .load_shlib     = load_aout32_library,
+       .core_dump      = aout32_core_dump,
+       .min_coredump   = PAGE_SIZE,
 };
 
 static void set_brk(unsigned long start, unsigned long end)
@@ -83,7 +86,7 @@ if (file->f_op->llseek) { \
  * dumping of the process results in another error..
  */
 
-static int aout32_core_dump(long signr, struct pt_regs *regs, struct file *file)
+static int aout32_core_dump(long signr, struct pt_regs *regs, struct file *file, unsigned long limit)
 {
        mm_segment_t fs;
        int has_dumped = 0;
@@ -102,13 +105,11 @@ static int aout32_core_dump(long signr, struct pt_regs *regs, struct file *file)
 
 /* If the size of the dump file exceeds the rlimit, then see what would happen
    if we wrote the stack, but not the data area.  */
-       if ((dump.u_dsize+dump.u_ssize) >
-           current->signal->rlim[RLIMIT_CORE].rlim_cur)
+       if (dump.u_dsize + dump.u_ssize > limit)
                dump.u_dsize = 0;
 
 /* Make sure we have enough room to write the stack and data areas. */
-       if ((dump.u_ssize) >
-           current->signal->rlim[RLIMIT_CORE].rlim_cur)
+       if (dump.u_ssize > limit)
                dump.u_ssize = 0;
 
 /* make sure we actually have a data and stack area to dump */