[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 8 Aug 2008 22:26:35 +0100
From: Alan Cox <alan@...rguk.ukuu.org.uk>
To: Aristeu Rozanski <arozansk@...hat.com>
Cc: linux-kernel@...r.kernel.org, akpm@...ux-foundation.org,
jirislaby@...il.com
Subject: Re: [PATCH] vt: kill tty->count usage
> 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
--
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