1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-28 16:43:09 +00:00

Drop the kernel linker lock while running SYSUNINIT routines and removing

sysctls during a linker file unload.  We drop the lock when doing similar
operations during a linker file load.  To close races, clear the LINKED
flag before dropping the lock so that the linker file is no longer visible
to userland.

MFC after:	1 week
This commit is contained in:
John Baldwin 2009-02-05 23:01:36 +00:00
parent ab28e51677
commit e4d9b9eb18
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=188209

View File

@ -643,8 +643,11 @@ linker_file_unload(linker_file_t file, int flags)
* link error.
*/
if (file->flags & LINKER_FILE_LINKED) {
file->flags &= ~LINKER_FILE_LINKED;
KLD_UNLOCK();
linker_file_sysuninit(file);
linker_file_unregister_sysctls(file);
KLD_LOCK();
}
TAILQ_REMOVE(&linker_files, file, link);