[patch] 2.4.17-pre5 oops on floppy type 6

Keith Owens (kaos@ocs.com.au)
Fri, 07 Dec 2001 14:30:30 +1100


IBM Thinkpads i1200/1300 with USB floppy (type 6) oops in
drivers/block/floppy.c register_devfs_entries(). Off by one bug when
comparing an index with the array size.

Index: 17-pre5.1/drivers/block/floppy.c
--- 17-pre5.1/drivers/block/floppy.c Fri, 07 Dec 2001 09:35:49 +1100 kaos (linux-2.4/c/c/40_floppy.c 1.2.1.1.1.5 644)
+++ 17-pre5.1(w)/drivers/block/floppy.c Fri, 07 Dec 2001 14:27:37 +1100 kaos (linux-2.4/c/c/40_floppy.c 1.2.1.1.1.5 644)
@@ -3917,7 +3917,7 @@ static void __init register_devfs_entrie
{NULL, t360, t1200, t3in+5+8, t3in+5, t3in, t3in};

base_minor = (drive < 4) ? drive : (124 + drive);
- if (UDP->cmos <= NUMBER(default_drive_params)) {
+ if (UDP->cmos < NUMBER(default_drive_params)) {
i = 0;
do {
char name[16];

-
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/