aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/kern_linker.c
diff options
context:
space:
mode:
authorMateusz Guzik <mjg@FreeBSD.org>2015-07-30 19:52:43 +0000
committerMateusz Guzik <mjg@FreeBSD.org>2015-07-30 19:52:43 +0000
commit4ae1e3c75294c5442c4e94430ec4ff8b7f3a930c (patch)
treeb30edd8fce68fa1251c56ab7294588e848a2342d /sys/kern/kern_linker.c
parent4ed2d460bd9976f6ff0250d3003ec840da54dd92 (diff)
downloadsrc-4ae1e3c75294c5442c4e94430ec4ff8b7f3a930c.tar.gz
src-4ae1e3c75294c5442c4e94430ec4ff8b7f3a930c.zip
Revert r285125 until rmlocks get fixed.
Right now there is a chance that sysctl unregister will cause reader to block on the sx lock associated with sysctl rmlock, in which case kernels with debug enabled will panic.
Notes
Notes: svn path=/head/; revision=286094
Diffstat (limited to 'sys/kern/kern_linker.c')
-rw-r--r--sys/kern/kern_linker.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/kern/kern_linker.c b/sys/kern/kern_linker.c
index bb92e18db790..a4fde06198f4 100644
--- a/sys/kern/kern_linker.c
+++ b/sys/kern/kern_linker.c
@@ -292,10 +292,10 @@ linker_file_register_sysctls(linker_file_t lf)
return;
sx_xunlock(&kld_sx);
- sysctl_wlock();
+ sysctl_xlock();
for (oidp = start; oidp < stop; oidp++)
sysctl_register_oid(*oidp);
- sysctl_wunlock();
+ sysctl_xunlock();
sx_xlock(&kld_sx);
}
@@ -313,10 +313,10 @@ linker_file_unregister_sysctls(linker_file_t lf)
return;
sx_xunlock(&kld_sx);
- sysctl_wlock();
+ sysctl_xlock();
for (oidp = start; oidp < stop; oidp++)
sysctl_unregister_oid(*oidp);
- sysctl_wunlock();
+ sysctl_xunlock();
sx_xlock(&kld_sx);
}