]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - kernel/acct.c
tty: Fix abusers of current->sighand->tty
[linux-2.6-omap-h63xx.git] / kernel / acct.c
index dd68b905941818df3253e6f60558a49b9fbf2ef4..f6006a60df5ddff73990656f73ea7fff55dcf9b8 100644 (file)
@@ -548,7 +548,7 @@ static void do_acct_process(struct bsd_acct_struct *acct,
 #endif
 
        spin_lock_irq(&current->sighand->siglock);
-       tty = current->signal->tty;
+       tty = current->signal->tty;     /* Safe as we hold the siglock */
        ac.ac_tty = tty ? old_encode_dev(tty_devnum(tty)) : 0;
        ac.ac_utime = encode_comp_t(jiffies_to_AHZ(cputime_to_jiffies(pacct->ac_utime)));
        ac.ac_stime = encode_comp_t(jiffies_to_AHZ(cputime_to_jiffies(pacct->ac_stime)));