From: Eli Billauer <eli@billauer.co.il>
To: linux-kernel@vger.kernel.org
Subject: pty.c: tty_lock() and tty_unlock() in reverse order?
Date: Fri, 29 Oct 2010 19:40:14 +0200 [thread overview]
Message-ID: <4CCB06FE.8050705@billauer.co.il> (raw)
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
reply other threads:[~2010-10-29 17:38 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4CCB06FE.8050705@billauer.co.il \
--to=eli@billauer.co.il \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox