Commit 3854a771 authored by Oleg Nesterov's avatar Oleg Nesterov Committed by Linus Torvalds

__exit_signal: don't take rcu lock

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: default avatarOleg Nesterov <oleg@tv-sign.ru>
Cc: Roland McGrath <roland@redhat.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 100360f0
...@@ -85,7 +85,6 @@ static void __exit_signal(struct task_struct *tsk) ...@@ -85,7 +85,6 @@ static void __exit_signal(struct task_struct *tsk)
BUG_ON(!sig); BUG_ON(!sig);
BUG_ON(!atomic_read(&sig->count)); BUG_ON(!atomic_read(&sig->count));
rcu_read_lock();
sighand = rcu_dereference(tsk->sighand); sighand = rcu_dereference(tsk->sighand);
spin_lock(&sighand->siglock); spin_lock(&sighand->siglock);
...@@ -136,7 +135,6 @@ static void __exit_signal(struct task_struct *tsk) ...@@ -136,7 +135,6 @@ static void __exit_signal(struct task_struct *tsk)
tsk->signal = NULL; tsk->signal = NULL;
tsk->sighand = NULL; tsk->sighand = NULL;
spin_unlock(&sighand->siglock); spin_unlock(&sighand->siglock);
rcu_read_unlock();
__cleanup_sighand(sighand); __cleanup_sighand(sighand);
clear_tsk_thread_flag(tsk,TIF_SIGPENDING); clear_tsk_thread_flag(tsk,TIF_SIGPENDING);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment