lkml.org 
[lkml]   [2002]   [Jul]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[BUG-2.5.24-BK] DriverFS panics on boot!
Date
From
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;
\
 
 \ /
  Last update: 2005-03-22 13:27    [W:2.007 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site