From: Dmitry Torokhov <dtor_core@ameritech.net>

psmouse - if keyboard controller reports a timeout or a parity error do not
try to process the byte, log the problem and drop it early.



---

 drivers/input/mouse/psmouse-base.c |    7 +++++++
 1 files changed, 7 insertions(+)

diff -puN drivers/input/mouse/psmouse-base.c~psmouse-drop-timed-out-bytes drivers/input/mouse/psmouse-base.c
--- 25/drivers/input/mouse/psmouse-base.c~psmouse-drop-timed-out-bytes	2004-01-21 11:59:03.000000000 -0800
+++ 25-akpm/drivers/input/mouse/psmouse-base.c	2004-01-21 11:59:03.000000000 -0800
@@ -134,6 +134,13 @@ static irqreturn_t psmouse_interrupt(str
 		goto out;
 	}
 
+	if (flags & (SERIO_PARITY|SERIO_TIMEOUT)) {
+		printk(KERN_WARNING "psmouse.c: bad data from KBC -%s%s\n",
+			flags & SERIO_TIMEOUT ? " timeout" : "",
+			flags & SERIO_PARITY ? " bad parity" : "");
+		goto out;
+	}
+
 	if (psmouse->acking) {
 		switch (data) {
 			case PSMOUSE_RET_ACK:

_