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 ntfs
Jan 18 17:10:13 ws21 /kernel: linkerunload: attempt to unload file which
was not loaded by user
kldunload: can't unload file: Device busy
Here is patch.
*** kern_linker.c.orig Mon Jan 18 17:22:39 1999
--- kern_linker.c Mon Jan 18 16:40:33 1999
***************
*** 653,660 ****
error = EBUSY;
goto out;
}
- lf->userrefs--;
error = linker_file_unload(lf);
} else
error = ENOENT;
--- 653,662 ----
error = EBUSY;
goto out;
}
error = linker_file_unload(lf);
+ if(error)
+ goto out;
+ lf->userrefs--;
} else
error = ENOENT;
To Unsubscribe: send mail to [email protected]
with "unsubscribe freebsd-current" in the body of the message