diff options
author | Oleg Nesterov <oleg@tv-sign.ru> | 2006-06-26 00:26:08 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-26 09:58:27 -0700 |
commit | 7b1c6154fa8bb937e0b1b4f2adbb315d70270f10 (patch) | |
tree | 1d58e5e7da61330639ebe62671fb666596d1b00a /fs/inotify_user.c | |
parent | d5f70c00ad24cd1158d3678b44ff969b4c971d49 (diff) | |
download | op-kernel-dev-7b1c6154fa8bb937e0b1b4f2adbb315d70270f10.zip op-kernel-dev-7b1c6154fa8bb937e0b1b4f2adbb315d70270f10.tar.gz |
[PATCH] coredump: don't take tasklist_lock
This patch removes tasklist_lock from zap_threads().
This is safe wrt:
do_exit:
The caller holds mm->mmap_sem. This means that task which
shares the same ->mm can't pass exit_mm(), so it can't be
unhashed from init_task.tasks or ->thread_group lists.
fork:
None of sub-threads can fork after zap_process(leader). All
processes which were created before this point should be
visible to zap_threads() because copy_process() adds the new
process to the tail of init_task.tasks list, and ->siglock
lock/unlock provides a memory barrier.
de_thread:
It does list_replace_rcu(&leader->tasks, ¤t->tasks).
So zap_threads() will see either old or new leader, it does
not matter. However, it can change p->sighand, so we should
use lock_task_sighand() in zap_process().
Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/inotify_user.c')
0 files changed, 0 insertions, 0 deletions