Skip to content

Commit

Permalink
__exit_signal: don't take rcu lock
Browse files Browse the repository at this point in the history
There is no reason for rcu_read_lock() in __exit_signal().  tsk->sighand
can only be changed if tsk does exec, obviously this is not possible.

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>
  • Loading branch information
Oleg Nesterov authored and torvalds committed Jul 25, 2008
1 parent 100360f commit 3854a77
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions kernel/exit.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ static void __exit_signal(struct task_struct *tsk)
BUG_ON(!sig);
BUG_ON(!atomic_read(&sig->count));

rcu_read_lock();
sighand = rcu_dereference(tsk->sighand);
spin_lock(&sighand->siglock);

Expand Down Expand Up @@ -136,7 +135,6 @@ static void __exit_signal(struct task_struct *tsk)
tsk->signal = NULL;
tsk->sighand = NULL;
spin_unlock(&sighand->siglock);
rcu_read_unlock();

__cleanup_sighand(sighand);
clear_tsk_thread_flag(tsk,TIF_SIGPENDING);
Expand Down

0 comments on commit 3854a77

Please sign in to comment.