summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormpi <mpi@openbsd.org>2018-04-03 08:58:05 +0000
committermpi <mpi@openbsd.org>2018-04-03 08:58:05 +0000
commita5deb9f3caa84a21208597cd4a74e822a864905a (patch)
treecfcd3b917989bdd1527ce00f1a96dacf7d20c8d6
parentDeactivate witness(4) checks if we are in ddb(4), when `db_active' is set. (diff)
downloadwireguard-openbsd-a5deb9f3caa84a21208597cd4a74e822a864905a.tar.xz
wireguard-openbsd-a5deb9f3caa84a21208597cd4a74e822a864905a.zip
Silence assertwaitok() if we are in ddb(4).
ok bluhm@
-rw-r--r--sys/kern/subr_xxx.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/kern/subr_xxx.c b/sys/kern/subr_xxx.c
index 4ffcdd54e0e..0ecc0b060f2 100644
--- a/sys/kern/subr_xxx.c
+++ b/sys/kern/subr_xxx.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: subr_xxx.c,v 1.15 2015/12/05 10:11:53 tedu Exp $ */
+/* $OpenBSD: subr_xxx.c,v 1.16 2018/04/03 08:58:05 mpi Exp $ */
/* $NetBSD: subr_xxx.c,v 1.10 1996/02/04 02:16:51 christos Exp $ */
/*
@@ -155,6 +155,9 @@ blktochr(dev_t dev)
void
assertwaitok(void)
{
+ if (panicstr || db_active)
+ return;
+
splassert(IPL_NONE);
#ifdef DIAGNOSTIC
if (curcpu()->ci_mutex_level != 0)