Sorry for self reply.
Patch isn't good enougth:-) becouse linker_file_unload()
deallocates lf structure's memory... so lf->userrefs-- may cause
page fault or whatever else. (I wonder how that didn't happened)
Look at this one:
*** kern_linker.c.orig Mon Jan 18 17:22:39 1999
--- kern_linker.c
Imagine:
I'm trying to unload KLD module, it is busy:
# kldunload -n ntfs
kldunload: can't unload file: Device busy
After this point i'll never get module unloaded becouse
kldunload() in sys/kern/kern_linker.c has already decremeted
lf->userrefs. I'll get only this messages:
# kldunload -n ntf