[PATCH] elf_core_dump: don't take tasklist_lock
authorOleg Nesterov <oleg@tv-sign.ru>
Fri, 29 Sep 2006 09:00:24 +0000 (02:00 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Fri, 29 Sep 2006 16:18:14 +0000 (09:18 -0700)
commit486ccb05fdbb7ca79784fdf0d07d2a86de48cf05
tree9f53973acf7080790ec18984a9eb4a1005bb2875
parentb22b4cdd53f5e1ee9ef1ef7933ddb77065859d05
[PATCH] elf_core_dump: don't take tasklist_lock

do_each_thread() is rcu-safe, and all tasks which use this ->mm must sleep
in wait_for_completion(&mm->core_done) at this point, so we can use RCU
locks.

Also, remove unneeded INIT_LIST_HEAD(new) before list_add(new, head).

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
fs/binfmt_elf.c