Re: 2.6.5-rc3-mm1

From: Russell King
Date: Wed Mar 31 2004 - 02:26:43 EST


On Tue, Mar 30, 2004 at 06:26:27PM -0800, Andrew Morton wrote:
> Andrew Morton <akpm@xxxxxxxx> wrote:
> >
> > I'm thinking that this can be fixed from the other direction: just before
> > release_dev() calls close (dropping BKL), if tty->count==1, make the
> > going-away tty ineligible for concurrent lookups. Do that by setting
> > tty->driver->ttys[idx] to NULL. Maybe.
>
> Famous last word: Volia!

I suspect you may just be able to get away with this for serial drivers
using serial_core. However, I suspect it'll break non-serial_core using
serial drivers.

The serial drivers track the tty count themselves, so that they know
when to do the final close processing (why you may ask - because of
the blocking for DCD in the open code.) I wouldn't like to say what
would happen if ->open were called for a different tty structure for
the same port while ->close was in progress.

--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 PCMCIA - http://pcmcia.arm.linux.org.uk/
2.6 Serial core
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/