HomeFreeBSD

kern_reboot: unconditionally call shutdown_reset()

Description

kern_reboot: unconditionally call shutdown_reset()

Currently shutdown_reset() is registered as the final entry of the
shutdown_final event handler. However, if a panic occurs early in boot
before the event is registered (SI_SUB_INTRINSIC), we may end up
spinning in the subsequent infinite for loop and failing to reset
altogether. Instead we can simply call this function unconditionally.

Reviewed by: markj
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D37981

(cherry picked from commit 627ca221c311b5d9c4132e03664a96f390ff5c0d)

Details

Provenance
mhorneAuthored on Jan 23 2023, 6:47 PM
Reviewer
markj
Differential Revision
D37981: ddb: have 'reset' command use normal reboot path
Parents
rG11ade1dffc8d: cpuset: Handle CPU_WHICH_TIDPID wherever cpuset_which() is called.
Branches
Unknown
Tags
Unknown