diff options
| author | mrg <mrg@NetBSD.org> | 2018-08-12 22:05:29 +0000 |
|---|---|---|
| committer | mrg <mrg@NetBSD.org> | 2018-08-12 22:05:29 +0000 |
| commit | b1642e3f64f21afde296f6d9d863643b38227f9c (patch) | |
| tree | fbd28467d09d5dd8a93fb0e8ed9b7af1626fbadf /sys/ddb/db_command.c | |
| parent | 51ada30d8098341c945cb69c92b45f9655c2af99 (diff) | |
add a lockdebug_dismiss() function for DDB to use that tells
lockdebug to avoid asserts. use it for the ddb "reboot"
command, so that it doesn't matter how ddb was entered, the
reboot not trigger mutex checks and not work.
Diffstat (limited to 'sys/ddb/db_command.c')
| -rw-r--r-- | sys/ddb/db_command.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/ddb/db_command.c b/sys/ddb/db_command.c index c49a66317d3..997e4a79c44 100644 --- a/sys/ddb/db_command.c +++ b/sys/ddb/db_command.c @@ -1,4 +1,4 @@ -/* $NetBSD: db_command.c,v 1.154 2018/07/20 08:26:25 msaitoh Exp $ */ +/* $NetBSD: db_command.c,v 1.155 2018/08/12 22:05:29 mrg Exp $ */ /* * Copyright (c) 1996, 1997, 1998, 1999, 2002, 2009 The NetBSD Foundation, Inc. @@ -60,7 +60,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: db_command.c,v 1.154 2018/07/20 08:26:25 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: db_command.c,v 1.155 2018/08/12 22:05:29 mrg Exp $"); #ifdef _KERNEL_OPT #include "opt_aio.h" @@ -1352,6 +1352,10 @@ db_reboot_cmd(db_expr_t addr, bool have_addr, * called from cpu_reboot. */ db_recover = 0; + /* Avoid all mutex errors */ +#ifdef LOCKDEBUG + lockdebug_dismiss(); +#endif panicstr = "reboot forced via kernel debugger"; cpu_reboot((int)bootflags, NULL); #else /* _KERNEL */ |
