Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F154501922
D35373.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
3 KB
Referenced Files
None
Subscribers
None
D35373.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D35373: Use KERNEL_PANICKED() in more places
Attached
Detach File
Event Timeline
Log In to Comment