]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commit
signals: do_tkill: don't use tasklist_lock
authorOleg Nesterov <oleg@tv-sign.ru>
Wed, 30 Apr 2008 07:52:51 +0000 (00:52 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 30 Apr 2008 15:29:35 +0000 (08:29 -0700)
commit3547ff3aefbe092ca35506c60c02e2d17a4f2199
tree722222124ae06ef45947fae20913bbd71e179c49
parent6e65acba7ca8169e38ab55d62d52f29a75fb141f
signals: do_tkill: don't use tasklist_lock

Convert do_tkill() to use rcu_read_lock() + lock_task_sighand() to avoid
taking tasklist lock.

Note that we don't return an error if lock_task_sighand() fails, we pretend
the task dies after receiving the signal.  Otherwise, we should fight with the
nasty races with mt-exec without having any advantage.

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Roland McGrath <roland@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
kernel/signal.c