Messages in this thread Patch in this message | | | Subject | [BUG-2.5.24-BK] DriverFS panics on boot! | Date | Thu, 04 Jul 2002 11:41:22 -0400 | From | James Bottomley <> |
| |
Er, oops, I think this one's my fault.
The recent driverfs additions for SCSI also added partition handling in driverfs. The code is slightly more invasive than it should be so the IDE driver needs to know how to use it (which it doesn't yet). In theory there's a NULL pointer check in driverfs_create_partitions for precisely this case, but it looks like the IDE code is forgetting to zero out a kmalloc of a struct gendisk somewhere (hence the 5a5a... contents). At a cursory glance, this seems to be in ide/probe.c, so does the attached patch fix it?
I'll try to reproduce, but I'm all SCSI here except for my laptop.
James
===== drivers/ide/probe.c 1.58 vs edited ===== --- 1.58/drivers/ide/probe.c Fri Jun 14 09:11:19 2002 +++ edited/drivers/ide/probe.c Thu Jul 4 10:31:35 2002 @@ -1143,6 +1143,7 @@ if (!gd) goto err_kmalloc_gd; + memset(gd, 0, sizeof(struct gendisk)); gd->sizes = kmalloc(ATA_MINORS * sizeof(int), GFP_KERNEL); if (!gd->sizes) goto err_kmalloc_gd_sizes; | |