Re: enbd module 2.6.13-15 kernel fails to modprobe or insmod
Norbert Pieroth <[email protected]> Tue, 22 Aug 2006 10:47:49 +0200
| Newsgroups | gmane.linux.enbd.general |
|---|---|
| Organization | zdf |
| Message-ID | <[email protected]> |
Peter T. Breuer wrote: > I should add ... > > >>ENBD #5353[0]: enbd_init Enhanced Network Block Device 2.4.30 $Date: 2002/09/17 >>16:33:22 $ by [email protected] >>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 " > "[email protected]\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 > > > > _______________________________________________ > ENBD mailing list > [email protected] > http://lists.community.tummy.com/mailman/listinfo/enbd > Hi Peter, sorry for not responding directly. I was out of the office a few days. I followed your suggestions by disabling the DEBUG switch and changing the name of the log function. But it all changed nothing on the behaviour. As next I've set up a SuSE 10.0 with kernel version 2.6.15.4 from kernel.org. The build worked, the machine is running nice, but the kernelmodule (enbd.ko) couldn't be loaded. There was an unknown symbol (enbd: unknown symbol strcpy) in the module. So I think I'm doing some final tests with nbd. If this doesn't work either I have to look for another solution. With kind regards N.Pieroth