lkml.org 
[lkml]   [2008]   [Aug]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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



\
 
 \ /
  Last update: 2008-08-08 23:47    [W:0.072 / U:0.596 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site