* pty.c: tty_lock() and tty_unlock() in reverse order?
@ 2010-10-29 17:40 Eli Billauer
0 siblings, 0 replies; only message in thread
From: Eli Billauer @ 2010-10-29 17:40 UTC (permalink / raw)
To: linux-kernel
Hello,
After having some problems with a simple open of /dev/tty taking 30
seconds or so (more precisely, a complete freeze of login console and
very slow ssh), I looked a bit into the kernel code.
My very recently downloaded kernel.org 2.6.36's pty.c goes as below.
What bothers me is that tty_unlock() is called first, and tty_lock()
just before exiting. Shouldn't it be the other way around?
static void pty_close(struct tty_struct *tty, struct file *filp)
{
[snipped some code here, no games with locks]
tty_*un*lock();
tty_vhangup(tty->link);
tty_lock();
}
}
Eli
--
Web: http://www.billauer.co.il
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-10-29 17:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-29 17:40 pty.c: tty_lock() and tty_unlock() in reverse order? Eli Billauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox