diff options
Diffstat (limited to 'fs/binfmt_elf_fdpic.c')
-rw-r--r-- | fs/binfmt_elf_fdpic.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/fs/binfmt_elf_fdpic.c b/fs/binfmt_elf_fdpic.c index 2f3365829229..f86d5c9ce5eb 100644 --- a/fs/binfmt_elf_fdpic.c +++ b/fs/binfmt_elf_fdpic.c | |||
@@ -1597,20 +1597,19 @@ static int elf_fdpic_core_dump(long signr, struct pt_regs *regs, | |||
1597 | 1597 | ||
1598 | if (signr) { | 1598 | if (signr) { |
1599 | struct elf_thread_status *tmp; | 1599 | struct elf_thread_status *tmp; |
1600 | read_lock(&tasklist_lock); | 1600 | rcu_read_lock(); |
1601 | do_each_thread(g,p) | 1601 | do_each_thread(g,p) |
1602 | if (current->mm == p->mm && current != p) { | 1602 | if (current->mm == p->mm && current != p) { |
1603 | tmp = kzalloc(sizeof(*tmp), GFP_ATOMIC); | 1603 | tmp = kzalloc(sizeof(*tmp), GFP_ATOMIC); |
1604 | if (!tmp) { | 1604 | if (!tmp) { |
1605 | read_unlock(&tasklist_lock); | 1605 | rcu_read_unlock(); |
1606 | goto cleanup; | 1606 | goto cleanup; |
1607 | } | 1607 | } |
1608 | INIT_LIST_HEAD(&tmp->list); | ||
1609 | tmp->thread = p; | 1608 | tmp->thread = p; |
1610 | list_add(&tmp->list, &thread_list); | 1609 | list_add(&tmp->list, &thread_list); |
1611 | } | 1610 | } |
1612 | while_each_thread(g,p); | 1611 | while_each_thread(g,p); |
1613 | read_unlock(&tasklist_lock); | 1612 | rcu_read_unlock(); |
1614 | list_for_each(t, &thread_list) { | 1613 | list_for_each(t, &thread_list) { |
1615 | struct elf_thread_status *tmp; | 1614 | struct elf_thread_status *tmp; |
1616 | int sz; | 1615 | int sz; |