patch-2.1.131 linux/drivers/char/keyboard.c

Next file: linux/drivers/char/lp.c
Previous file: linux/drivers/char/joystick/joystick.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.130/linux/drivers/char/keyboard.c linux/drivers/char/keyboard.c
@@ -201,7 +201,12 @@
 	add_keyboard_randomness(scancode);
 
 	tty = ttytab? ttytab[fg_console]: NULL;
- 	kbd = kbd_table + fg_console;
+	if (tty && (!tty->driver_data)) {
+		/* This is to workaround ugly bug in tty_io.c, which
+                   does not do locking when it should */
+		tty = NULL;
+	}
+	kbd = kbd_table + fg_console;
 	if ((raw_mode = (kbd->kbdmode == VC_RAW))) {
  		put_queue(scancode);
 		/* we do not return yet, because we want to maintain

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov