projects
/
dragonfly.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
f5e3dac
)
kernel - Stop KTR logging during panic
author
Matthew Dillon <dillon@apollo.backplane.com>
Thu, 16 Aug 2012 16:11:07 +0000 (09:11 -0700)
committer
Matthew Dillon <dillon@apollo.backplane.com>
Tue, 21 Aug 2012 03:59:12 +0000 (20:59 -0700)
* Stop all KTR logging when a panic occurs so the KTR buffer doesn't
get wiped out by events during the panic & core dump. This gives
us a KTR buf snapshot as of the panic entry.
sys/kern/kern_ktr.c
patch
|
blob
|
blame
|
history
diff --git
a/sys/kern/kern_ktr.c
b/sys/kern/kern_ktr.c
index
e4c819c
..
2963c79
100644
(file)
--- a/
sys/kern/kern_ktr.c
+++ b/
sys/kern/kern_ktr.c
@@
-419,7
+419,9
@@
ktr_begin_write_entry(struct ktr_info *info, const char *file, int line)
cpu = mycpu->gd_cpuid;
kcpu = &ktr_cpu[cpu].core;
- if (kcpu->ktr_buf == NULL)
+ if (panicstr) /* stop logging during panic */
+ return NULL;
+ if (kcpu->ktr_buf == NULL) /* too early in boot */
return NULL;
crit_enter();