]> git.kernelconcepts.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 7ef5f9fe2729aa29c3554cc7858494f4d463fb2a..4450e82a05aab4ae95f77f78fa8504a53b2f04cf 100644 (file)
@@ -1480,7 +1480,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);
@@ -1550,7 +1550,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;
 
        /*
@@ -1713,14 +1713,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;
 
@@ -1738,13 +1738,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 */
@@ -1951,7 +1951,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;