Page MenuHomeFreeBSD

D35373.diff
No OneTemporary

D35373.diff

diff --git a/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c b/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c
--- a/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c
@@ -7338,7 +7338,7 @@
volatile uint16_t *flags;
hrtime_t now;
- if (panicstr != NULL)
+ if (KERNEL_PANICKED())
return;
#ifdef illumos
@@ -7369,7 +7369,7 @@
#ifdef illumos
if (panic_quiesce) {
#else
- if (panicstr != NULL) {
+ if (KERNEL_PANICKED()) {
#endif
/*
* We don't trace anything if we're panicking.
diff --git a/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c b/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c
--- a/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c
+++ b/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c
@@ -718,7 +718,7 @@
* always uses sc->hs_chan, then we must send to that channel or a poll
* timeout will occur.
*/
- if (panicstr) {
+ if (KERNEL_PANICKED()) {
outgoing_channel = sc->hs_chan;
} else {
outgoing_channel = sc->hs_sel_chan[ch_sel];
diff --git a/sys/dev/vt/vt_core.c b/sys/dev/vt/vt_core.c
--- a/sys/dev/vt/vt_core.c
+++ b/sys/dev/vt/vt_core.c
@@ -593,7 +593,8 @@
* switch to console mode when panicking, making sure the panic
* is readable (even when a GUI was using ttyv0).
*/
- if ((kdb_active || panicstr) && vd->vd_driver->vd_postswitch)
+ if ((kdb_active || KERNEL_PANICKED()) &&
+ vd->vd_driver->vd_postswitch)
vd->vd_driver->vd_postswitch(vd);
VT_UNLOCK(vd);
return (0);
diff --git a/sys/kern/kern_shutdown.c b/sys/kern/kern_shutdown.c
--- a/sys/kern/kern_shutdown.c
+++ b/sys/kern/kern_shutdown.c
@@ -835,7 +835,7 @@
* If we are suppressing secondary panics, log the warning but do not
* re-enter panic/kdb.
*/
- if (panicstr != NULL && kassert_suppress_in_panic) {
+ if (KERNEL_PANICKED() && kassert_suppress_in_panic) {
if (kassert_do_log) {
printf("KASSERT failed: %s\n", buf);
#ifdef KDB
@@ -932,7 +932,7 @@
bootopt = RB_AUTOBOOT;
newpanic = 0;
- if (panicstr)
+ if (KERNEL_PANICKED())
bootopt |= RB_NOSYNC;
else {
bootopt |= RB_DUMP;
@@ -1016,7 +1016,7 @@
struct proc *p;
int error;
- if (panicstr)
+ if (KERNEL_PANICKED())
return;
p = (struct proc *)arg;
@@ -1036,7 +1036,7 @@
struct thread *td;
int error;
- if (panicstr)
+ if (KERNEL_PANICKED())
return;
td = (struct thread *)arg;
diff --git a/sys/kern/subr_asan.c b/sys/kern/subr_asan.c
--- a/sys/kern/subr_asan.c
+++ b/sys/kern/subr_asan.c
@@ -387,7 +387,7 @@
return;
if (__predict_false(kasan_md_unsupported(addr)))
return;
- if (__predict_false(panicstr != NULL))
+ if (KERNEL_PANICKED())
return;
if (__builtin_constant_p(size)) {
diff --git a/sys/kern/subr_msan.c b/sys/kern/subr_msan.c
--- a/sys/kern/subr_msan.c
+++ b/sys/kern/subr_msan.c
@@ -178,7 +178,7 @@
char buf[128];
int type;
- if (__predict_false(panicstr != NULL || kdb_active || kmsan_reporting))
+ if (__predict_false(KERNEL_PANICKED() || kdb_active || kmsan_reporting))
return;
kmsan_reporting = true;
@@ -234,7 +234,7 @@
long foff;
int type;
- if (__predict_false(panicstr != NULL || kdb_active || kmsan_reporting))
+ if (__predict_false(KERNEL_PANICKED() || kdb_active || kmsan_reporting))
return;
kmsan_reporting = true;

File Metadata

Mime Type
text/plain
Expires
Wed, Apr 29, 6:50 PM (15 h, 32 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
32376745
Default Alt Text
D35373.diff (3 KB)

Event Timeline