lkml.org 
[lkml]   [2004]   [Mar]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 2.6.5-rc2-mm5
Russell King <rmk+lkml@arm.linux.org.uk> wrote:
>
> On Mon, Mar 29, 2004 at 02:25:56AM -0800, Andrew Morton wrote:
> > > and it is completely valid for ->close to be called while
> > > another thread is in ->open. In fact, it's desirable since ->open may
> > > be waiting for the DCD line from a modem to activate, while there may
> > > be a simultaneous O_NONBLOCK open/ioctl/close from stty.
> >
> > ->open is not called under tty_sem. With this change, ->close is called
> > under tty_sem.
> >
> > Are ->close implementations likely to block on hardware events?
>
> Historically they have blocked in a well defined manner - eg when
> dropping the DTR signal for a specified minimum time period.
>
> They can also block until the data awaiting transmission has been
> sent, which by default has a 30 second timeout, or may be configured
> to be "until sent". Of course, if CTS is deasserted, we will wait
> until the timeout.

I suspect such drivers have always had a barndoor-sized hole in them, if
someone tries to open the thing while ->close is sleeping.

I'll take another look at the darn thing tomorrrow.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:02    [W:0.116 / U:0.468 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site