Re: [PATCH 2/2] Psmouse log and discard timed out bytes

From: Dmitry Torokhov
Date: Sat Jan 10 2004 - 03:50:33 EST


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


ChangeSet@xxxxxx, 2004-01-10 02:52:04-05:00, dtor_core@xxxxxxxxxxxxx
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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/