[OOPS+PATCH 2.6] Fix oops in parkbd

From: Dmitry Torokhov
Date: Sat Oct 09 2004 - 23:56:23 EST


When converting to dynamic serio allocation I messed up parkbd
causing it to Oops when registering its serio port.

--
Dmitry


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


ChangeSet@xxxxxx, 2004-10-09 08:09:54-05:00, dtor_core@xxxxxxxxxxxxx
Input: parkbd - zero-fill allocated serio structure to
prevent Oops when registering port.

Signed-off-by: Dmitry Torokhov <dtor@xxxxxxx>


parkbd.c | 1 +
1 files changed, 1 insertion(+)


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



diff -Nru a/drivers/input/serio/parkbd.c b/drivers/input/serio/parkbd.c
--- a/drivers/input/serio/parkbd.c 2004-10-09 23:49:06 -05:00
+++ b/drivers/input/serio/parkbd.c 2004-10-09 23:49:06 -05:00
@@ -160,6 +160,7 @@

serio = kmalloc(sizeof(struct serio), GFP_KERNEL);
if (serio) {
+ memset(serio, 0, sizeof(struct serio));
serio->type = parkbd_mode;
serio->write = parkbd_write,
strlcpy(serio->name, "PARKBD AT/XT keyboard adapter", sizeof(serio->name));
-
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/