From: Pavel Machek Subject: Re: [Bug #14388] keyboard under X with 2.6.31 Date: Sat, 17 Oct 2009 18:40:42 +0200 Message-ID: <20091017164042.GC1423@ucw.cz> References: <56acieJJ2fF.A.nEB.Hzl0KB@chimera> <87ljjgfcbu.fsf@spindle.srvr.nix> Mime-Version: 1.0 Return-path: Content-Disposition: inline In-Reply-To: Sender: kernel-testers-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Linus Torvalds Cc: Nix , Alan Cox , Paul Fulghum , "Justin P. Mattock" , "Rafael J. Wysocki" , Linux Kernel Mailing List , Kernel Testers List , Boyan , Dmitry Torokhov , Ed Tomlinson , "Fr?d?ric L. W. Meunier" , OGAWA Hirofumi Hi! > Comments? Does this work? Does it make any difference? It seems fairly > unlikely, but it's the only obvious problem I've seen in the tty buffering > code so far. > > And that code is literally 3 years old, and it seems unlikely that a > regular _keyboard_ buffer would be able to hit the (rather small) race > condition. But other serialization may have hidden it, and timing > differences could certainly have caused it to trigger much more easily. I use this (run as root) to trigger various problems in this area... (portable between i386 and i386). Pavel void main(void) { int i; iopl(3); while (1) { asm volatile("cli"); // for (i=0; i<20000000; i++) for (i=0; i<1000000000; i++) asm volatile(""); asm volatile("sti"); sleep(1); } } -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html