diff options
Diffstat (limited to 'kernel/acct.c')
-rw-r--r-- | kernel/acct.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/kernel/acct.c b/kernel/acct.c index 2a7c933651c7..f4330acead46 100644 --- a/kernel/acct.c +++ b/kernel/acct.c | |||
@@ -483,10 +483,14 @@ static void do_acct_process(struct file *file) | |||
483 | ac.ac_ppid = current->parent->tgid; | 483 | ac.ac_ppid = current->parent->tgid; |
484 | #endif | 484 | #endif |
485 | 485 | ||
486 | read_lock(&tasklist_lock); /* pin current->signal */ | 486 | mutex_lock(&tty_mutex); |
487 | /* FIXME: Whoever is responsible for current->signal locking needs | ||
488 | to use the same locking all over the kernel and document it */ | ||
489 | read_lock(&tasklist_lock); | ||
487 | ac.ac_tty = current->signal->tty ? | 490 | ac.ac_tty = current->signal->tty ? |
488 | old_encode_dev(tty_devnum(current->signal->tty)) : 0; | 491 | old_encode_dev(tty_devnum(current->signal->tty)) : 0; |
489 | read_unlock(&tasklist_lock); | 492 | read_unlock(&tasklist_lock); |
493 | mutex_unlock(&tty_mutex); | ||
490 | 494 | ||
491 | spin_lock_irq(¤t->sighand->siglock); | 495 | spin_lock_irq(¤t->sighand->siglock); |
492 | ac.ac_utime = encode_comp_t(jiffies_to_AHZ(cputime_to_jiffies(pacct->ac_utime))); | 496 | ac.ac_utime = encode_comp_t(jiffies_to_AHZ(cputime_to_jiffies(pacct->ac_utime))); |