[lkml]   [2003]   [Sep]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
SubjectRe: 2.6.0-test5-mm4 boot crash
On Wed, Sep 24, 2003 at 11:18:47AM +0200, Helge Hafting wrote:
> Unable to handle null pointer deref at virtual address 00000000
> eip c02b7d1e eip at md_probe

Oh, boy... OK, I see what happens and it's _ugly_. md_probe() is misused
there big way. The minimal fix is to revert the cleanup in md_probe() -
int unit = *part;
int unit = MINOR(dev);

However, that is crap solution. The problem is that md_probe() is called
directly with bogus arguments - not only part is NULL (which triggers the
oops), but dev (which is supposed to be dev_t value) is actually mdidx(mddev).

Cleaner fix follows, but we really need to get the situation with gendisk
allocations into the sane shape there. Sigh...

diff -urN B5-tty_devnum-fix/drivers/md/md.c B5-current/drivers/md/md.c
--- B5-tty_devnum-fix/drivers/md/md.c Tue Sep 23 04:16:30 2003
+++ B5-current/drivers/md/md.c Wed Sep 24 05:44:27 2003
@@ -1500,6 +1500,7 @@
mdk_rdev_t *rdev;
struct gendisk *disk;
+ int unit;

if (list_empty(&mddev->disks)) {
@@ -1591,8 +1592,9 @@
invalidate_bdev(rdev->bdev, 0);

- md_probe(mdidx(mddev), NULL, NULL);
- disk = disks[mdidx(mddev)];
+ unit = mdidx(mddev);
+ md_probe(0, &unit, NULL);
+ disk = disks[unit];
if (!disk)
return -ENOMEM;

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at
 \ /
  Last update: 2005-03-22 13:48    [W:0.101 / U:6.904 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site