Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern in pmf_system_shutdown(), don't do anything if we'r...
details: https://anonhg.NetBSD.org/src/rev/1534c80bed14
branches: trunk
changeset: 782668:1534c80bed14
user: chs <chs%NetBSD.org@localhost>
date: Tue Nov 13 14:08:07 2012 +0000
description:
in pmf_system_shutdown(), don't do anything if we're panicing.
this prevents a hang trying to shut down other CPUs on x86,
and in general we could be called in any context from a panic
so it's best to skip unnecessary operations in that case.
diffstat:
sys/kern/kern_pmf.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diffs (29 lines):
diff -r 5eaa95b70ae2 -r 1534c80bed14 sys/kern/kern_pmf.c
--- a/sys/kern/kern_pmf.c Tue Nov 13 14:07:42 2012 +0000
+++ b/sys/kern/kern_pmf.c Tue Nov 13 14:08:07 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_pmf.c,v 1.35 2011/06/05 09:04:22 dsl Exp $ */
+/* $NetBSD: kern_pmf.c,v 1.36 2012/11/13 14:08:07 chs Exp $ */
/*-
* Copyright (c) 2007 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_pmf.c,v 1.35 2011/06/05 09:04:22 dsl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_pmf.c,v 1.36 2012/11/13 14:08:07 chs Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -381,6 +381,10 @@
void
pmf_system_shutdown(int how)
{
+
+ if (panicstr != NULL)
+ return;
+
aprint_debug("Shutting down devices:");
shutdown_all(how);
}
Home |
Main Index |
Thread Index |
Old Index