aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/exit.c
diff options
context:
space:
mode:
authorOleg Nesterov <oleg@tv-sign.ru>2008-07-25 04:47:29 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-25 13:53:38 -0400
commit3854a771821c970065e3203a0b40ddc4101538cc (patch)
treeb6f56b8d426c4a9682dfc8605a08a5c60f96a599 /kernel/exit.c
parent100360f03077663b7bef3af44805b6cf700c3bee (diff)
__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: 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>
Diffstat (limited to 'kernel/exit.c')
-rw-r--r--kernel/exit.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/kernel/exit.c b/kernel/exit.c
index 93d2711b9381..a7799d8a6404 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -85,7 +85,6 @@ static void __exit_signal(struct task_struct *tsk)
85 BUG_ON(!sig); 85 BUG_ON(!sig);
86 BUG_ON(!atomic_read(&sig->count)); 86 BUG_ON(!atomic_read(&sig->count));
87 87
88 rcu_read_lock();
89 sighand = rcu_dereference(tsk->sighand); 88 sighand = rcu_dereference(tsk->sighand);
90 spin_lock(&sighand->siglock); 89 spin_lock(&sighand->siglock);
91 90
@@ -136,7 +135,6 @@ static void __exit_signal(struct task_struct *tsk)
136 tsk->signal = NULL; 135 tsk->signal = NULL;
137 tsk->sighand = NULL; 136 tsk->sighand = NULL;
138 spin_unlock(&sighand->siglock); 137 spin_unlock(&sighand->siglock);
139 rcu_read_unlock();
140 138
141 __cleanup_sighand(sighand); 139 __cleanup_sighand(sighand);
142 clear_tsk_thread_flag(tsk,TIF_SIGPENDING); 140 clear_tsk_thread_flag(tsk,TIF_SIGPENDING);