mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* PATCH: Lock tty directly in acct layer
@ 2006-08-16 16:36 Alan Cox
  2006-08-16 16:24 ` Arjan van de Ven
  0 siblings, 1 reply; 3+ messages in thread
From: Alan Cox @ 2006-08-16 16:36 UTC (permalink / raw)
  To: akpm, linux-kernel

Signed-off-by: Alan Cox <alan@redhat.com>

diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla-2.6.18-rc4-mm1/kernel/acct.c linux-2.6.18-rc4-mm1/kernel/acct.c
--- linux.vanilla-2.6.18-rc4-mm1/kernel/acct.c	2006-08-15 15:40:19.000000000 +0100
+++ linux-2.6.18-rc4-mm1/kernel/acct.c	2006-08-15 16:03:18.000000000 +0100
@@ -483,10 +484,10 @@
 	ac.ac_ppid = current->parent->tgid;
 #endif
 
-	read_lock(&tasklist_lock);	/* pin current->signal */
+	mutex_lock(&tty_mutex);
 	ac.ac_tty = current->signal->tty ?
 		old_encode_dev(tty_devnum(current->signal->tty)) : 0;
-	read_unlock(&tasklist_lock);
+	mutex_unlock(&tty_mutex);
 
 	spin_lock_irq(&current->sighand->siglock);
 	ac.ac_utime = encode_comp_t(jiffies_to_AHZ(cputime_to_jiffies(pacct->ac_utime)));


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-08-16 16:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-08-16 16:36 PATCH: Lock tty directly in acct layer Alan Cox
2006-08-16 16:24 ` Arjan van de Ven
2006-08-16 17:09   ` Alan Cox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®