diff options
author | Attilio Rao <attilio@FreeBSD.org> | 2012-12-22 09:37:34 +0000 |
---|---|---|
committer | Attilio Rao <attilio@FreeBSD.org> | 2012-12-22 09:37:34 +0000 |
commit | cd2fe4e632de2dcf3c4ca17242c9609bf34746fe (patch) | |
tree | 223c35655c8b163024a006c82d65f305e5d2126d /sys/kern/kern_mutex.c | |
parent | c6719ccdef73725bfe780ea617f8b0c686cc274b (diff) | |
download | src-cd2fe4e632de2dcf3c4ca17242c9609bf34746fe.tar.gz src-cd2fe4e632de2dcf3c4ca17242c9609bf34746fe.zip |
Fixup r240424: On entering KDB backends, the hijacked thread to run
interrupt context can still be idlethread. At that point, without the
panic condition, it can still happen that idlethread then will try to
acquire some locks to carry on some operations.
Skip the idlethread check on block/sleep lock operations when KDB is
active.
Reported by: jh
Tested by: jh
MFC after: 1 week
Notes
Notes:
svn path=/head/; revision=244582
Diffstat (limited to 'sys/kern/kern_mutex.c')
-rw-r--r-- | sys/kern/kern_mutex.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_mutex.c b/sys/kern/kern_mutex.c index 2f138637141d..39f461e25fcd 100644 --- a/sys/kern/kern_mutex.c +++ b/sys/kern/kern_mutex.c @@ -210,7 +210,7 @@ __mtx_lock_flags(volatile uintptr_t *c, int opts, const char *file, int line) m = mtxlock2mtx(c); - KASSERT(!TD_IS_IDLETHREAD(curthread), + KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(curthread), ("mtx_lock() by idle thread %p on sleep mutex %s @ %s:%d", curthread, m->lock_object.lo_name, file, line)); KASSERT(m->mtx_lock != MTX_DESTROYED, @@ -326,7 +326,7 @@ _mtx_trylock_flags_(volatile uintptr_t *c, int opts, const char *file, int line) m = mtxlock2mtx(c); - KASSERT(!TD_IS_IDLETHREAD(curthread), + KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(curthread), ("mtx_trylock() by idle thread %p on sleep mutex %s @ %s:%d", curthread, m->lock_object.lo_name, file, line)); KASSERT(m->mtx_lock != MTX_DESTROYED, |