Skip to contentSkip to conversation

2.4.15 drivers/block/floppy.c devfs out by one

PATCH New Keith Owens 1 participant 1 message Nov 25, 2001 Block layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 2.4.15 drivers/block/floppy.c devfs out by one

No obvious floppy maintainer to send this to. Out by one bug in register_devfs_entries, on machines that return floppy type 7 (IBM Thinkpad i1200/1300 Model 1161-43M), floppy.o gets an oops while evaluating table[table_sup[UDP->cmos][i]].

BTW, this breaks RH 7.x and Mandrake 8.x installs on this laptop.

Index: 15.1/drivers/block/floppy.c

drivers/block/floppy.c Sun, 25 Nov 2001 23:58:32 +1100 kaos (linux-2.5/Y/b/32_floppy.c 1.1 644) renamed from drivers/block/floppy.c Sat, 24 Nov 2001 05:28:08 +1100 kaos (linux-2.5/Y/b/32_floppy.c 1.1 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];