From: Oleg Nesterov Date: Wed, 30 Apr 2008 07:52:38 +0000 (-0700) Subject: do_task_stat: don't take rcu_read_lock() X-Git-Tag: v2.6.26-rc1~307 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=06fffb1267c9d986687b69d74a46ee332a50575e;p=linux-2.6-omap-h63xx.git do_task_stat: don't take rcu_read_lock() lock_task_sighand() was changed, and do_task_stat() doesn't need rcu_read_lock any longer. sighand->siglock protects all "interesting" fields. Except: it doesn't protect ->tty->pgrp, but neither does rcu_read_lock(), this should be fixed. Signed-off-by: Oleg Nesterov Cc: "Eric W. Biederman" Cc: "Paul E. McKenney" Cc: Roland McGrath Cc: Alan Cox Cc: Pavel Emelyanov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/proc/array.c b/fs/proc/array.c index 07d6c4853fe..b07a71002f2 100644 --- a/fs/proc/array.c +++ b/fs/proc/array.c @@ -425,7 +425,6 @@ static int do_task_stat(struct seq_file *m, struct pid_namespace *ns, cutime = cstime = utime = stime = cputime_zero; cgtime = gtime = cputime_zero; - rcu_read_lock(); if (lock_task_sighand(task, &flags)) { struct signal_struct *sig = task->signal; @@ -469,7 +468,6 @@ static int do_task_stat(struct seq_file *m, struct pid_namespace *ns, unlock_task_sighand(task, &flags); } - rcu_read_unlock(); if (!whole || num_threads < 2) wchan = get_wchan(task);