aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/kern_sx.c
diff options
context:
space:
mode:
authorMateusz Guzik <mjg@FreeBSD.org>2017-02-17 05:09:51 +0000
committerMateusz Guzik <mjg@FreeBSD.org>2017-02-17 05:09:51 +0000
commitafa39f7a32c9b2d6003b06fda5c4fc21ab199747 (patch)
tree61ee4febfeb71652bf59820f66db6cee38d5e973 /sys/kern/kern_sx.c
parent4c9ea0ced9aa5cb778030030a4bf62aa33a8c74b (diff)
downloadsrc-afa39f7a32c9b2d6003b06fda5c4fc21ab199747.tar.gz
src-afa39f7a32c9b2d6003b06fda5c4fc21ab199747.zip
locks: remove SCHEDULER_STOPPED checks from primitives for modules
They all fallback to the slow path if necessary and the check is there. This means a panicked kernel executing code from modules will be able to succeed doing actual lock/unlock, but this was already the case for core code which has said primitives inlined.
Notes
Notes: svn path=/head/; revision=313853
Diffstat (limited to 'sys/kern/kern_sx.c')
-rw-r--r--sys/kern/kern_sx.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/sys/kern/kern_sx.c b/sys/kern/kern_sx.c
index 96ca4dffef28..7162a1aa243e 100644
--- a/sys/kern/kern_sx.c
+++ b/sys/kern/kern_sx.c
@@ -295,8 +295,6 @@ _sx_xlock(struct sx *sx, int opts, const char *file, int line)
uintptr_t tid, x;
int error = 0;
- if (SCHEDULER_STOPPED())
- return (0);
KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(curthread),
("sx_xlock() by idle thread %p on sx %s @ %s:%d",
curthread, sx->lock_object.lo_name, file, line));
@@ -360,8 +358,6 @@ void
_sx_xunlock(struct sx *sx, const char *file, int line)
{
- if (SCHEDULER_STOPPED())
- return;
KASSERT(sx->sx_lock != SX_LOCK_DESTROYED,
("sx_xunlock() of destroyed sx @ %s:%d", file, line));
_sx_assert(sx, SA_XLOCKED, file, line);