]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - fs/binfmt_elf.c
coredump: pass siginfo_t* to do_coredump() and below, not merely signr
[karo-tx-linux.git] / fs / binfmt_elf.c
index a6cb3baf9cdeeadac7d84697c74381b60cebf6c9..a1a9613a3210f0f6b55af9330ccb6a89eec23918 100644 (file)
@@ -1479,7 +1479,7 @@ static int fill_thread_core_info(struct elf_thread_core_info *t,
 
 static int fill_note_info(struct elfhdr *elf, int phdrs,
                          struct elf_note_info *info,
-                         long signr, struct pt_regs *regs)
+                         siginfo_t *siginfo, struct pt_regs *regs)
 {
        struct task_struct *dump_task = current;
        const struct user_regset_view *view = task_user_regset_view(dump_task);
@@ -1549,7 +1549,7 @@ static int fill_note_info(struct elfhdr *elf, int phdrs,
         * Now fill in each thread's information.
         */
        for (t = info->thread; t != NULL; t = t->next)
-               if (!fill_thread_core_info(t, view, signr, &info->size))
+               if (!fill_thread_core_info(t, view, siginfo->si_signo, &info->size))
                        return 0;
 
        /*
@@ -1712,14 +1712,14 @@ static int elf_note_info_init(struct elf_note_info *info)
 
 static int fill_note_info(struct elfhdr *elf, int phdrs,
                          struct elf_note_info *info,
-                         long signr, struct pt_regs *regs)
+                         siginfo_t *siginfo, struct pt_regs *regs)
 {
        struct list_head *t;
 
        if (!elf_note_info_init(info))
                return 0;
 
-       if (signr) {
+       if (siginfo->si_signo) {
                struct core_thread *ct;
                struct elf_thread_status *ets;
 
@@ -1737,13 +1737,13 @@ static int fill_note_info(struct elfhdr *elf, int phdrs,
                        int sz;
 
                        ets = list_entry(t, struct elf_thread_status, list);
-                       sz = elf_dump_thread_status(signr, ets);
+                       sz = elf_dump_thread_status(siginfo->si_signo, ets);
                        info->thread_status_size += sz;
                }
        }
        /* now collect the dump for the current */
        memset(info->prstatus, 0, sizeof(*info->prstatus));
-       fill_prstatus(info->prstatus, current, signr);
+       fill_prstatus(info->prstatus, current, siginfo->si_signo);
        elf_core_copy_regs(&info->prstatus->pr_reg, regs);
 
        /* Set up header */
@@ -1950,7 +1950,7 @@ static int elf_core_dump(struct coredump_params *cprm)
         * Collect all the non-memory information about the process for the
         * notes.  This also sets up the file header.
         */
-       if (!fill_note_info(elf, e_phnum, &info, cprm->signr, cprm->regs))
+       if (!fill_note_info(elf, e_phnum, &info, cprm->siginfo, cprm->regs))
                goto cleanup;
 
        has_dumped = 1;