lkml.org 
[lkml]   [2004]   [Jan]   [10]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
FromDmitry Torokhov <>
SubjectRe: [PATCH 2/2] Psmouse log and discard timed out bytes
DateSat, 10 Jan 2004 03:46:03 -0500
===================================================================

ChangeSet@1.1513, 2004-01-10 02:52:04-05:00, dtor_core@ameritech.net
  Input: 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.


 psmouse-base.c |    7 +++++++
 1 files changed, 7 insertions(+)

===================================================================


diff -Nru a/drivers/input/mouse/psmouse-base.c b/drivers/input/mouse/psmouse-base.c
--- a/drivers/input/mouse/psmouse-base.c	Sat Jan 10 03:23:08 2004
+++ b/drivers/input/mouse/psmouse-base.c	Sat Jan 10 03:23:08 2004
@@ -121,6 +121,13 @@
 	if (psmouse->state == PSMOUSE_IGNORE)
 		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:
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 12:59    [from the cache]
©2003-2008