[PATCH] 2.2.9 reproducible oops in ide_unregister

Klaus Kudielka (klaus.kudielka@ieee.org)
Wed, 26 May 1999 13:55:18 +0900


--- linux/drivers/block/ide.c.orig Thu May 13 05:19:32 1999
+++ linux/drivers/block/ide.c Wed May 26 13:11:30 1999
@@ -272,7 +272,8 @@
if (drive->removable && id != NULL) {
if (!strncmp(id->model, "KODAK ATA_FLASH", 15) /* Kodak */
|| !strncmp(id->model, "Hitachi CV", 10) /* Hitachi */
- || !strncmp(id->model, "SunDisk SDCFB", 13)) /* SunDisk */
+ || !strncmp(id->model, "SunDisk SDCFB", 13) /* SunDisk */
+ || !strncmp(id->model, "HAGIWARA HPC", 12)) /* Hagiwara */
{
return 1; /* yes, it is a flash memory card */
}
@@ -1722,6 +1723,8 @@
sti();
for (unit = 0; unit < MAX_DRIVES; ++unit) {
drive = &hwif->drives[unit];
+ if (!drive->present)
+ continue;
minor = drive->select.b.unit << PARTN_BITS;
for (p = 0; p < (1<<PARTN_BITS); ++p) {
if (drive->part[p].nr_sects > 0) {

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/