Skip to contentSkip to conversation

2.4.17-pre5 oops on floppy type 6

PATCH New Keith Owens 1 participant 1 message Dec 7, 2001 Block layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 2.4.17-pre5 oops on floppy type 6

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

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) renamed from 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) +1 -1
@@ -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];