[PATCH] use kzalloc and kcalloc in core fs code
Signed-off-by: Oliver Neukum <oliver@neukum.name> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:

committed by
Linus Torvalds

parent
656bde5728
commit
11b0b5abb2
@@ -1465,12 +1465,11 @@ static int elf_core_dump(long signr, struct pt_regs * regs, struct file * file)
|
||||
read_lock(&tasklist_lock);
|
||||
do_each_thread(g,p)
|
||||
if (current->mm == p->mm && current != p) {
|
||||
tmp = kmalloc(sizeof(*tmp), GFP_ATOMIC);
|
||||
tmp = kzalloc(sizeof(*tmp), GFP_ATOMIC);
|
||||
if (!tmp) {
|
||||
read_unlock(&tasklist_lock);
|
||||
goto cleanup;
|
||||
}
|
||||
memset(tmp, 0, sizeof(*tmp));
|
||||
INIT_LIST_HEAD(&tmp->list);
|
||||
tmp->thread = p;
|
||||
list_add(&tmp->list, &thread_list);
|
||||
|
Reference in New Issue
Block a user