[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20101125163035.3105747b@desktopvm.lvknet>
Date: Thu, 25 Nov 2010 16:30:35 +0300
From: Alexander Gordeev <lasaine@....cs.msu.su>
To: Alan Cox <alan@...ux.intel.com>
Cc: Alan Cox <alan@...rguk.ukuu.org.uk>, linux-kernel@...r.kernel.org,
"Nikita V\. Youshchenko" <yoush@...msu.su>,
linuxpps@...enneenne.com, Rodolfo Giometti <giometti@...eenne.com>,
Greg Kroah-Hartman <gregkh@...e.de>,
Arnd Bergmann <arnd@...db.de>,
Al Viro <viro@...iv.linux.org.uk>,
Nick Piggin <npiggin@...nel.dk>,
Jason Wessel <jason.wessel@...driver.com>,
Philippe Langlais <philippe.langlais@...ricsson.com>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCHv5 05/17] tty: don't allow ldisc dcd_change() after ldisc
halt
В Wed, 24 Nov 2010 22:36:00 +0000
Alan Cox <alan@...ux.intel.com> пишет:
> > Yes, indeed, it's a bug. Please consider the following example:
> >
> > CPU1 CPU2
> > =========================================================
> > uart_handle_dcd_change() { tty_set_ldisc() {
> > ld = tty_ldisc_ref(...) ...
>
> [We have a reference]
> > ... tty_ldisc_halt(...)
> [Should block]
>
> > I think tty code is exactly the right place to fix this bug; this is
> > what my patch is for.
>
> More special case magic on top of the current crap isn't the right fix
> here, tty_ldisc_halt needs to wait for the references to hit zero.
Didn't know that current design is crap. :)
Ok, I think I'll add a new waitqueue and a new bit (TTY_LDISC_NOREF)
that halt will wait for. Is it good?
--
Alexander
Download attachment "signature.asc" of type "application/pgp-signature" (491 bytes)
Powered by blists - more mailing lists