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.
This commit is contained in:
parent
4c9ea0ced9
commit
afa39f7a32
@ -231,9 +231,6 @@ __mtx_lock_flags(volatile uintptr_t *c, int opts, const char *file, int line)
|
||||
struct mtx *m;
|
||||
uintptr_t tid, v;
|
||||
|
||||
if (SCHEDULER_STOPPED())
|
||||
return;
|
||||
|
||||
m = mtxlock2mtx(c);
|
||||
|
||||
KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(curthread),
|
||||
@ -266,9 +263,6 @@ __mtx_unlock_flags(volatile uintptr_t *c, int opts, const char *file, int line)
|
||||
{
|
||||
struct mtx *m;
|
||||
|
||||
if (SCHEDULER_STOPPED())
|
||||
return;
|
||||
|
||||
m = mtxlock2mtx(c);
|
||||
|
||||
KASSERT(m->mtx_lock != MTX_DESTROYED,
|
||||
|
@ -267,9 +267,6 @@ _rw_wlock_cookie(volatile uintptr_t *c, const char *file, int line)
|
||||
struct rwlock *rw;
|
||||
uintptr_t tid, v;
|
||||
|
||||
if (SCHEDULER_STOPPED())
|
||||
return;
|
||||
|
||||
rw = rwlock2rw(c);
|
||||
|
||||
KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(curthread),
|
||||
@ -335,9 +332,6 @@ _rw_wunlock_cookie(volatile uintptr_t *c, const char *file, int line)
|
||||
{
|
||||
struct rwlock *rw;
|
||||
|
||||
if (SCHEDULER_STOPPED())
|
||||
return;
|
||||
|
||||
rw = rwlock2rw(c);
|
||||
|
||||
KASSERT(rw->rw_lock != RW_DESTROYED,
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user