From: Alan Cox Subject: Re: [Bug #14388] keyboard under X with 2.6.31 Date: Wed, 14 Oct 2009 00:01:45 +0100 Message-ID: <20091014000145.3a611c94@lxorguk.ukuu.org.uk> References: <56acieJJ2fF.A.nEB.Hzl0KB@chimera> <87ljjgfcbu.fsf@spindle.srvr.nix> <4AD3F769.5080405@gmail.com> <4AD437F9.9020708@yahoo.co.uk> <4AD4DE4C.4010402@yahoo.co.uk> <4AD4F548.2030506@microgate.com> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Sender: kernel-testers-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: Content-Type: text/plain; charset="us-ascii" To: Linus Torvalds Cc: Paul Fulghum , Boyan , " =?ISO-8859-14?B?RnLpZOlyaWM=?= L. W. Meunier" , "Justin P. Mattock" , Nix , "Rafael J. Wysocki" , Linux Kernel Mailing List , Kernel Testers List , Dmitry Torokhov , Ed Tomlinson , OGAWA Hirofumi > And no, I'm not sure my patch helps. I'd have expected > 'tty_buffer_flush()' to be something very rare, for example. But I also > didn't really check if we may do it some other way. It is rare for most applications > But I _am_ sure that it makes the code a whole lot more straightforward. > Bits that say "we're busy flushing" suddenly actually act that way, and > pointers that say "this is the head of the buffers" also act that wy. The more I look the more I think a mutex is the right answer. It also provides us with a "stop feeding me" lock for ldisc changes and tty close down bits.