aboutsummaryrefslogtreecommitdiffstats
path: root/fs/binfmt_elf.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2013-10-14 07:39:56 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2013-11-09 00:16:30 -0500
commitafabada957a6b28abfd37eb52efeefdfe6871c4b (patch)
treee5ef8085293b1b5855eff339a2930f6cf35bc380 /fs/binfmt_elf.c
parentec57941e031685de434916e5398d0ca1d44cd374 (diff)
elf{,_fdpic} coredump: get rid of pointless if (siginfo->si_signo)
we can't get to do_coredump() if that condition isn't satisfied... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/binfmt_elf.c')
-rw-r--r--fs/binfmt_elf.c33
1 files changed, 15 insertions, 18 deletions
diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c
index 1af412b96e06..571a42326908 100644
--- a/fs/binfmt_elf.c
+++ b/fs/binfmt_elf.c
@@ -1833,31 +1833,28 @@ static int fill_note_info(struct elfhdr *elf, int phdrs,
1833 const siginfo_t *siginfo, struct pt_regs *regs) 1833 const siginfo_t *siginfo, struct pt_regs *regs)
1834{ 1834{
1835 struct list_head *t; 1835 struct list_head *t;
1836 struct core_thread *ct;
1837 struct elf_thread_status *ets;
1836 1838
1837 if (!elf_note_info_init(info)) 1839 if (!elf_note_info_init(info))
1838 return 0; 1840 return 0;
1839 1841
1840 if (siginfo->si_signo) { 1842 for (ct = current->mm->core_state->dumper.next;
1841 struct core_thread *ct; 1843 ct; ct = ct->next) {
1842 struct elf_thread_status *ets; 1844 ets = kzalloc(sizeof(*ets), GFP_KERNEL);
1843 1845 if (!ets)
1844 for (ct = current->mm->core_state->dumper.next; 1846 return 0;
1845 ct; ct = ct->next) {
1846 ets = kzalloc(sizeof(*ets), GFP_KERNEL);
1847 if (!ets)
1848 return 0;
1849 1847
1850 ets->thread = ct->task; 1848 ets->thread = ct->task;
1851 list_add(&ets->list, &info->thread_list); 1849 list_add(&ets->list, &info->thread_list);
1852 } 1850 }
1853 1851
1854 list_for_each(t, &info->thread_list) { 1852 list_for_each(t, &info->thread_list) {
1855 int sz; 1853 int sz;
1856 1854
1857 ets = list_entry(t, struct elf_thread_status, list); 1855 ets = list_entry(t, struct elf_thread_status, list);
1858 sz = elf_dump_thread_status(siginfo->si_signo, ets); 1856 sz = elf_dump_thread_status(siginfo->si_signo, ets);
1859 info->thread_status_size += sz; 1857 info->thread_status_size += sz;
1860 }
1861 } 1858 }
1862 /* now collect the dump for the current */ 1859 /* now collect the dump for the current */
1863 memset(info->prstatus, 0, sizeof(*info->prstatus)); 1860 memset(info->prstatus, 0, sizeof(*info->prstatus));