diff options
Diffstat (limited to 'fs/binfmt_elf.c')
-rw-r--r-- | fs/binfmt_elf.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c index bb43da5cde5c..6eb48e1446ec 100644 --- a/fs/binfmt_elf.c +++ b/fs/binfmt_elf.c | |||
@@ -1479,20 +1479,19 @@ static int elf_core_dump(long signr, struct pt_regs *regs, struct file *file) | |||
1479 | 1479 | ||
1480 | if (signr) { | 1480 | if (signr) { |
1481 | struct elf_thread_status *tmp; | 1481 | struct elf_thread_status *tmp; |
1482 | read_lock(&tasklist_lock); | 1482 | rcu_read_lock(); |
1483 | do_each_thread(g,p) | 1483 | do_each_thread(g,p) |
1484 | if (current->mm == p->mm && current != p) { | 1484 | if (current->mm == p->mm && current != p) { |
1485 | tmp = kzalloc(sizeof(*tmp), GFP_ATOMIC); | 1485 | tmp = kzalloc(sizeof(*tmp), GFP_ATOMIC); |
1486 | if (!tmp) { | 1486 | if (!tmp) { |
1487 | read_unlock(&tasklist_lock); | 1487 | rcu_read_unlock(); |
1488 | goto cleanup; | 1488 | goto cleanup; |
1489 | } | 1489 | } |
1490 | INIT_LIST_HEAD(&tmp->list); | ||
1491 | tmp->thread = p; | 1490 | tmp->thread = p; |
1492 | list_add(&tmp->list, &thread_list); | 1491 | list_add(&tmp->list, &thread_list); |
1493 | } | 1492 | } |
1494 | while_each_thread(g,p); | 1493 | while_each_thread(g,p); |
1495 | read_unlock(&tasklist_lock); | 1494 | rcu_read_unlock(); |
1496 | list_for_each(t, &thread_list) { | 1495 | list_for_each(t, &thread_list) { |
1497 | struct elf_thread_status *tmp; | 1496 | struct elf_thread_status *tmp; |
1498 | int sz; | 1497 | int sz; |