[<prev] [next>] [day] [month] [year] [list]
Message-id: <4CCB06FE.8050705@billauer.co.il>
Date: Fri, 29 Oct 2010 19:40:14 +0200
From: Eli Billauer <eli@...lauer.co.il>
To: linux-kernel@...r.kernel.org
Subject: pty.c: tty_lock() and tty_unlock() in reverse order?
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists