aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorOleg Nesterov <oleg@tv-sign.ru>2006-12-08 05:36:07 -0500
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-08 11:28:38 -0500
commit7bcfa95e561f11a17720162935e4f704c5d6fda3 (patch)
tree3386b5d140064ffd6fa77cc7d900bc690f7ad3a8 /kernel
parent915935041281c64589e2b7fe38437be22567fb6f (diff)
[PATCH] do_acct_process(): don't take tty_mutex
No need to take the global tty_mutex, signal->tty->driver can't go away while we are holding ->siglock. Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru> Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/acct.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/kernel/acct.c b/kernel/acct.c
index ca5619039367..69a40c9777a2 100644
--- a/kernel/acct.c
+++ b/kernel/acct.c
@@ -485,12 +485,9 @@ static void do_acct_process(struct file *file)
485 ac.ac_ppid = current->parent->tgid; 485 ac.ac_ppid = current->parent->tgid;
486#endif 486#endif
487 487
488 mutex_lock(&tty_mutex);
489 tty = get_current_tty();
490 ac.ac_tty = tty ? old_encode_dev(tty_devnum(tty)) : 0;
491 mutex_unlock(&tty_mutex);
492
493 spin_lock_irq(&current->sighand->siglock); 488 spin_lock_irq(&current->sighand->siglock);
489 tty = current->signal->tty;
490 ac.ac_tty = tty ? old_encode_dev(tty_devnum(tty)) : 0;
494 ac.ac_utime = encode_comp_t(jiffies_to_AHZ(cputime_to_jiffies(pacct->ac_utime))); 491 ac.ac_utime = encode_comp_t(jiffies_to_AHZ(cputime_to_jiffies(pacct->ac_utime)));
495 ac.ac_stime = encode_comp_t(jiffies_to_AHZ(cputime_to_jiffies(pacct->ac_stime))); 492 ac.ac_stime = encode_comp_t(jiffies_to_AHZ(cputime_to_jiffies(pacct->ac_stime)));
496 ac.ac_flag = pacct->ac_flag; 493 ac.ac_flag = pacct->ac_flag;