Page MenuHomeFreeBSD

Use KERNEL_PANICKED() in more places
ClosedPublic

Authored by mhorne on May 31 2022, 6:16 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Jan 19, 10:48 PM
Unknown Object (File)
Sun, Dec 28, 5:29 PM
Unknown Object (File)
Dec 12 2025, 4:36 PM
Unknown Object (File)
Nov 25 2025, 9:41 AM
Unknown Object (File)
Nov 10 2025, 5:28 AM
Unknown Object (File)
Nov 5 2025, 12:30 PM
Unknown Object (File)
Nov 3 2025, 1:14 PM
Unknown Object (File)
Oct 31 2025, 8:24 AM
Subscribers

Details

Summary

This is slightly more optimized than checking panicstr directly. For
most of these instances performance doesn't matter, but let's make
KERNEL_PANICKED() the common idiom.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 45798
Build 42686: arc lint + arc unit

Event Timeline

This revision is now accepted and ready to land.May 31 2022, 7:06 PM
sys/kern/subr_asan.c
390

So you didn't preserve the __predict_false here... but...

sys/kern/subr_msan.c
181

.... but you did here. Is there a reason for the difference?

sys/kern/subr_msan.c
181

the latter is a part of a bigger statement

i would argue the KERNEL_PANICKED || kdb_active thing should also be short-circuited into one macro which performs one branch

sys/kern/subr_asan.c
390

It is not obvious from this review, but KERNEL_PANICKED() expands to __predict_false(panicked).

sys/kern/subr_asan.c
390

Yea, I was wondering about the difference treatment... Though I misread the parens in at least one place.

This revision was automatically updated to reflect the committed changes.