Re: [Bug #14388] keyboard under X with 2.6.31

From: Linus Torvalds
Date: Tue Oct 13 2009 - 19:18:25 EST




On Wed, 14 Oct 2009, Alan Cox wrote:
>
> The better existing lock is probably tty->ldisc_mutex which we take when
> doing ldisc changes (which are an even more dramatic change during
> receive_buf).

Yeah, that makes sense. And then we'd automatically also solve the
"somebody tries to write during ldisc changes" issue. Not that I've
checked how much it could help, but maybe we could get rid of _some_ of
the special "tty_get_ldisc_wait()" kind of hacks.

And having that then protect flushing too would get rid of the
TTY_FLUSHING and TTY_FLUSHPENDING logic. So it does smell like a good
solution (without me looking at the code any closer right now, I can't
take any more tty code reading just now ;)

Linus
--
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/