[ENBD] enbd module 2.6.13-15 kernel fails to modprobe or insmod
Peter T. Breuer
ptb at inv.it.uc3m.es
Tue Aug 8 12:01:34 MDT 2006
I should add ...
> ENBD #5353[0]: enbd_init Enhanced Network Block Device 2.4.30 $Date: 2002/09/17
> 16:33:22 $ by ptb at it.uc3m.es
> Unable to handle kernel NULL pointer dereference at virtual address 0000033e
> printing eip:
This is in the enbd_init routine, very early on.
> [<cd800140>] init_module+0x140/0xdd1 [enbd]
It's only 300-odd bytes into the routine. Somewhere like here:
ENBD_INFO ("Enhanced Network Block Device " ENBD_VERSION " by "
"ptb at it.uc3m.es\n");
for (i = 0; i < MAX_NBD; i++) {
struct enbd_device *lo = &enbd_dev[i];
struct gendisk *disk = alloc_disk(ENBD_MAXCONN);
memset (lo, 0, sizeof (*lo));
if (!disk) {
ENBD_ERROR(
"Not enough memory to make a gendisk struct\n");
goto out_nomem;
}
lo->disk = disk;
spin_lock_init(&lo->lock);
disk->queue = blk_init_queue(do_enbd_request, &lo->lock);
if (!disk->queue) {
put_disk(disk);
lo->disk = NULL;
ENBD_ERROR(
"Not enough memory to make a queue struct\n");
goto out_nomem;
}
enbd_init_queue(lo, disk->queue);
}
if (register_blkdev (major, "nbd")) {
ENBD_ERROR ("Unable to register major number %d for NBD\n",
major);
return -EIO;
}
ENBD_INFO ("registered device at major %d\n", major);
It never got to that last line, though it started at the first line OK.
The only significant kernel functions called are
alloc_disk
blk_init_queue
register_blkdev
though enbd_init_queue also calls
blk_queue_max_sectors
and if I were to guess (always a bad idea. without evidence) I would
guess that one of those interface functions signatures in your kernel
doesn't match its use here. It does in my kernel! (2.6.15.4) You might
want to reassure me (and yourself) that you are using a vanilla kernel
and source by downloading one from kernel.org.
Peter
More information about the ENBD
mailing list