diff options
| author | Jeff Garzik <jeff@garzik.org> | 2006-09-30 23:45:41 -0400 |
|---|---|---|
| committer | Jeff Garzik <jeff@garzik.org> | 2006-09-30 23:45:41 -0400 |
| commit | 1c7da74c4aab595a994beb5fe728ebf0d0b41f59 (patch) | |
| tree | 64128abdf9550ebb51d8f3ee6732d7350b9c62f2 /kernel/acct.c | |
| parent | aebb1153ac54ddbbd3d3f0481a193f4bf0ead53b (diff) | |
| parent | 1bdfd554be94def718323659173517c5d4a69d25 (diff) | |
Merge branch 'master' into upstream
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))); |
