aboutsummaryrefslogtreecommitdiffstats
path: root/fs/proc/array.c
diff options
context:
space:
mode:
authorLai Jiangshan <laijs@cn.fujitsu.com>2008-10-04 16:51:15 -0400
committerAlexey Dobriyan <adobriyan@gmail.com>2008-10-09 20:18:57 -0400
commita6bebbc87a8c16eabb6bd5c6fd2d994be0236fba (patch)
tree3e617ca49063f3a12c982da5d6c687882a1b4070 /fs/proc/array.c
parent53167a3ef23df561d898dee636f3393e9fba937c (diff)
[PATCH] signal, procfs: some lock_task_sighand() users do not need rcu_read_lock()
lock_task_sighand() make sure task->sighand is being protected, so we do not need rcu_read_lock(). [ exec() will get task->sighand->siglock before change task->sighand! ] But code using rcu_read_lock() _just_ to protect lock_task_sighand() only appear in procfs. (and some code in procfs use lock_task_sighand() without such redundant protection.) Other subsystem may put lock_task_sighand() into rcu_read_lock() critical region, but these rcu_read_lock() are used for protecting "for_each_process()", "find_task_by_vpid()" etc. , not for protecting lock_task_sighand(). Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com> [ok from Oleg] Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Diffstat (limited to 'fs/proc/array.c')
-rw-r--r--fs/proc/array.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/fs/proc/array.c b/fs/proc/array.c
index 71c9be59c9c2..1c8d7b5d7a14 100644
--- a/fs/proc/array.c
+++ b/fs/proc/array.c
@@ -261,7 +261,6 @@ static inline void task_sig(struct seq_file *m, struct task_struct *p)
261 sigemptyset(&ignored); 261 sigemptyset(&ignored);
262 sigemptyset(&caught); 262 sigemptyset(&caught);
263 263
264 rcu_read_lock();
265 if (lock_task_sighand(p, &flags)) { 264 if (lock_task_sighand(p, &flags)) {
266 pending = p->pending.signal; 265 pending = p->pending.signal;
267 shpending = p->signal->shared_pending.signal; 266 shpending = p->signal->shared_pending.signal;
@@ -272,7 +271,6 @@ static inline void task_sig(struct seq_file *m, struct task_struct *p)
272 qlim = p->signal->rlim[RLIMIT_SIGPENDING].rlim_cur; 271 qlim = p->signal->rlim[RLIMIT_SIGPENDING].rlim_cur;
273 unlock_task_sighand(p, &flags); 272 unlock_task_sighand(p, &flags);
274 } 273 }
275 rcu_read_unlock();
276 274
277 seq_printf(m, "Threads:\t%d\n", num_threads); 275 seq_printf(m, "Threads:\t%d\n", num_threads);
278 seq_printf(m, "SigQ:\t%lu/%lu\n", qsize, qlim); 276 seq_printf(m, "SigQ:\t%lu/%lu\n", qsize, qlim);