diff --git a/sys/kern/kern_mutex.c b/sys/kern/kern_mutex.c index 2142de0a47a7..1ca5cca6eaab 100644 --- a/sys/kern/kern_mutex.c +++ b/sys/kern/kern_mutex.c @@ -216,6 +216,14 @@ propagate_priority(struct proc *p) return; } +#ifndef SMP + /* + * For UP, we check to see if p is curproc (this shouldn't + * ever happen however as it would mean we are in a deadlock.) + */ + KASSERT(p != curproc, ("Deadlock detected")); +#endif + /* * If on run queue move to new run queue, and * quit. @@ -501,7 +509,6 @@ _mtx_unlock_sleep(struct mtx *m, int opts, const char *file, int line) int pri; p = curproc; - MPASS4(mtx_owned(m), "mtx_owned(mpp)", file, line); if (mtx_recursed(m)) { if (--(m->mtx_recurse) == 0) @@ -949,6 +956,7 @@ static char *order_list[] = { }; static char *dup_list[] = { + "process lock", NULL }; diff --git a/sys/kern/subr_turnstile.c b/sys/kern/subr_turnstile.c index 2142de0a47a7..1ca5cca6eaab 100644 --- a/sys/kern/subr_turnstile.c +++ b/sys/kern/subr_turnstile.c @@ -216,6 +216,14 @@ propagate_priority(struct proc *p) return; } +#ifndef SMP + /* + * For UP, we check to see if p is curproc (this shouldn't + * ever happen however as it would mean we are in a deadlock.) + */ + KASSERT(p != curproc, ("Deadlock detected")); +#endif + /* * If on run queue move to new run queue, and * quit. @@ -501,7 +509,6 @@ _mtx_unlock_sleep(struct mtx *m, int opts, const char *file, int line) int pri; p = curproc; - MPASS4(mtx_owned(m), "mtx_owned(mpp)", file, line); if (mtx_recursed(m)) { if (--(m->mtx_recurse) == 0) @@ -949,6 +956,7 @@ static char *order_list[] = { }; static char *dup_list[] = { + "process lock", NULL }; diff --git a/sys/kern/subr_witness.c b/sys/kern/subr_witness.c index 2142de0a47a7..1ca5cca6eaab 100644 --- a/sys/kern/subr_witness.c +++ b/sys/kern/subr_witness.c @@ -216,6 +216,14 @@ propagate_priority(struct proc *p) return; } +#ifndef SMP + /* + * For UP, we check to see if p is curproc (this shouldn't + * ever happen however as it would mean we are in a deadlock.) + */ + KASSERT(p != curproc, ("Deadlock detected")); +#endif + /* * If on run queue move to new run queue, and * quit. @@ -501,7 +509,6 @@ _mtx_unlock_sleep(struct mtx *m, int opts, const char *file, int line) int pri; p = curproc; - MPASS4(mtx_owned(m), "mtx_owned(mpp)", file, line); if (mtx_recursed(m)) { if (--(m->mtx_recurse) == 0) @@ -949,6 +956,7 @@ static char *order_list[] = { }; static char *dup_list[] = { + "process lock", NULL };