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

Details

Provenance
mhorneAuthored on Jan 23 2023, 6:47 PM
Reviewer
markj
Differential Revision
D37981: ddb: have 'reset' command use normal reboot path
Parents
rGdec7db49602d: Add kf_file_nlink field to kf_file and populate it
Branches
Unknown
Tags
Unknown