diff options
author | Oleg Nesterov <oleg@tv-sign.ru> | 2008-04-30 07:52:38 (GMT) |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-30 15:29:34 (GMT) |
commit | 06fffb1267c9d986687b69d74a46ee332a50575e (patch) | |
tree | bfbef85a5fa65550f40d83e75d8e23cea5238772 | |
parent | d6cf723a142f63ccb92272bc0e9bfffd3c3a5cac (diff) | |
download | linux-06fffb1267c9d986687b69d74a46ee332a50575e.tar.xz |
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 <oleg@tv-sign.ru>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Cc: Roland McGrath <roland@redhat.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Pavel Emelyanov <xemul@sw.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | fs/proc/array.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/fs/proc/array.c b/fs/proc/array.c index 07d6c48..b07a710 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); |