[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20101124223600.5eb8476f@bob.linux.org.uk>
Date: Wed, 24 Nov 2010 22:36:00 +0000
From: Alan Cox <alan@...ux.intel.com>
To: Alexander Gordeev <lasaine@....cs.msu.su>
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
> 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.
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