diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2013-10-14 07:39:56 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-11-09 00:16:30 -0500 |
commit | afabada957a6b28abfd37eb52efeefdfe6871c4b (patch) | |
tree | e5ef8085293b1b5855eff339a2930f6cf35bc380 /fs/binfmt_elf_fdpic.c | |
parent | ec57941e031685de434916e5398d0ca1d44cd374 (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_fdpic.c')
-rw-r--r-- | fs/binfmt_elf_fdpic.c | 35 |
1 files changed, 16 insertions, 19 deletions
diff --git a/fs/binfmt_elf_fdpic.c b/fs/binfmt_elf_fdpic.c index 645f6e56f378..fe2a643ee005 100644 --- a/fs/binfmt_elf_fdpic.c +++ b/fs/binfmt_elf_fdpic.c | |||
@@ -1561,6 +1561,8 @@ static int elf_fdpic_core_dump(struct coredump_params *cprm) | |||
1561 | struct elf_shdr *shdr4extnum = NULL; | 1561 | struct elf_shdr *shdr4extnum = NULL; |
1562 | Elf_Half e_phnum; | 1562 | Elf_Half e_phnum; |
1563 | elf_addr_t e_shoff; | 1563 | elf_addr_t e_shoff; |
1564 | struct core_thread *ct; | ||
1565 | struct elf_thread_status *tmp; | ||
1564 | 1566 | ||
1565 | /* | 1567 | /* |
1566 | * We no longer stop all VM operations. | 1568 | * We no longer stop all VM operations. |
@@ -1596,28 +1598,23 @@ static int elf_fdpic_core_dump(struct coredump_params *cprm) | |||
1596 | goto cleanup; | 1598 | goto cleanup; |
1597 | #endif | 1599 | #endif |
1598 | 1600 | ||
1599 | if (cprm->siginfo->si_signo) { | 1601 | for (ct = current->mm->core_state->dumper.next; |
1600 | struct core_thread *ct; | 1602 | ct; ct = ct->next) { |
1601 | struct elf_thread_status *tmp; | 1603 | tmp = kzalloc(sizeof(*tmp), GFP_KERNEL); |
1602 | 1604 | if (!tmp) | |
1603 | for (ct = current->mm->core_state->dumper.next; | 1605 | goto cleanup; |
1604 | ct; ct = ct->next) { | ||
1605 | tmp = kzalloc(sizeof(*tmp), GFP_KERNEL); | ||
1606 | if (!tmp) | ||
1607 | goto cleanup; | ||
1608 | 1606 | ||
1609 | tmp->thread = ct->task; | 1607 | tmp->thread = ct->task; |
1610 | list_add(&tmp->list, &thread_list); | 1608 | list_add(&tmp->list, &thread_list); |
1611 | } | 1609 | } |
1612 | 1610 | ||
1613 | list_for_each(t, &thread_list) { | 1611 | list_for_each(t, &thread_list) { |
1614 | struct elf_thread_status *tmp; | 1612 | struct elf_thread_status *tmp; |
1615 | int sz; | 1613 | int sz; |
1616 | 1614 | ||
1617 | tmp = list_entry(t, struct elf_thread_status, list); | 1615 | tmp = list_entry(t, struct elf_thread_status, list); |
1618 | sz = elf_dump_thread_status(cprm->siginfo->si_signo, tmp); | 1616 | sz = elf_dump_thread_status(cprm->siginfo->si_signo, tmp); |
1619 | thread_status_size += sz; | 1617 | thread_status_size += sz; |
1620 | } | ||
1621 | } | 1618 | } |
1622 | 1619 | ||
1623 | /* now collect the dump for the current */ | 1620 | /* now collect the dump for the current */ |