Hi,

I've just found what it seems to me an error somewhere in the KLD modules
implementation affecting both 4-STABLE and 5-CURRENT. Following course of
actions makes kernel panic on both releases:
1. Load vn module into kernel
2. Configure vn device using vnconfig
3. Mount vn device
4. Unmount vn device
5. Unconfigure vn device
6. Unload vn kernel module
7. Try to mount vn device. Instead of expected "device not configured" you'll
have kernel panic.

It seems that vn device failed to deregister itself properly on kldunload.

-Maxim

Following is script of my session:

# kldstat
Id Refs Address    Size     Name
 1    2 0xc0100000 1c2f48   kernel
 2    1 0xc02c3000 30c8     splash_bmp.ko
root@notebook# vnconfig -c /dev/vn0 /tmp/tst
root@notebook# kldstat
Id Refs Address    Size     Name
 1    3 0xc0100000 1c2f48   kernel
 2    1 0xc02c3000 30c8     splash_bmp.ko
 3    1 0xc08b9000 3000     vn.ko
root@notebook# mount /dev/vn0c /mnt
root@notebook# mount
/dev/ad0s1a on / (ufs, asynchronous, NFS exported, local, noatime, writes: sync

4 async 41, reads: sync 507 async 22)
procfs on /proc (procfs, local)
/dev/vn0c on /mnt (ufs, local, writes: sync 2 async 0, reads: sync 1 async 0)
root@notebook# umount /mnt
root@notebook# vnconfig -u /dev/vn0
root@notebook# kldunload -i 3
root@notebook# kldstat
Id Refs Address    Size     Name
 1    2 0xc0100000 1c2f48   kernel
 2    1 0xc02c3000 30c8     splash_bmp.ko
root@notebook# mount /dev/vn0c /mnt

Fatal trap 12: page fault while in kernel mode
fault virtual address = 0xc08bb9f0
fault code = supervisor read, page not present
instruction pointer = 0x8:0xc016d9b9
stack pointer = 0x10:0xc3313d64
frame pointer = 0x10:0xc3313d70
code segment = base 0x0, limit 0xfffff, type 0x1b
= DPL 0, pres 1, def32 1, gran 1
processor eflags = interrupt enabled, resume, IOPL = 0
current process = 209 (mount)
interrupt mask = none
trap number = 12
panic: page fault




To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to