From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: Aristeu Rozanski <arozansk@redhat.com>
Cc: linux-kernel@vger.kernel.org, akpm@linux-foundation.org,
jirislaby@gmail.com
Subject: Re: [PATCH] vt: kill tty->count usage
Date: Fri, 8 Aug 2008 22:26:35 +0100 [thread overview]
Message-ID: <20080808222635.4fe52b51@lxorguk.ukuu.org.uk> (raw)
In-Reply-To: <20080808213625.GK20355@redhat.com>
> each driver can keep the number of the references itself. Holding tty_mutex
> before calling driver's close() and updating tty->count is not possible
> because some drivers sleep waiting until the tx buffer is empty.
Agreed.
> This patch was tested under normal usage and using the stress application I
> wrote that triggers the problem more easily.
>
> + if (vc->vc_tty != NULL) {
> + /* we're still releasing this console entry */
> + release_console_sem();
> + return -EBUSY;
That isn't valid behaviour according to the POSIX tty rules. An open of a
closing tty blocks until the close completes. Most drivers using the
TTY_CLOSING flag to handle this.
So NAK the patch but basically agree with the approach - the EBUSY needs
to become a 'wait for close to complete, goto retry'
Alan
next prev parent reply other threads:[~2008-08-08 21:44 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-08 21:36 [PATCH] vt: kill tty->count usage Aristeu Rozanski
2008-08-08 21:26 ` Alan Cox [this message]
2008-08-12 14:58 ` [PATCH] vt: kill tty->count usage (v2) Aristeu Rozanski
2008-08-15 9:58 ` Alan Cox
2008-08-18 17:19 ` Alan Cox
2008-08-18 21:04 ` Aristeu Rozanski
2008-08-18 21:01 ` Alan Cox
2008-08-19 12:37 ` Alan Cox
2008-08-19 15:03 ` Alan Cox
2008-08-19 17:03 ` Aristeu Rozanski
2008-08-19 17:14 ` Alan Cox
2008-08-20 0:03 ` Aristeu Rozanski
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=20080808222635.4fe52b51@lxorguk.ukuu.org.uk \
--to=alan@lxorguk.ukuu.org.uk \
--cc=akpm@linux-foundation.org \
--cc=arozansk@redhat.com \
--cc=jirislaby@gmail.com \
--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;
as well as URLs for NNTP newsgroup(s).