git: kern: skip module shutdown handlers on panic
Aaron LI
aly at crater.dragonflybsd.org
Sat Oct 17 06:08:28 PDT 2026
commit b2395074a5382b9e20d86353eeab0014a8dc9b52
Author: David Bidner <david at crap.solutions>
Date: Thu Oct 15 19:24:37 2026 +0200
kern: skip module shutdown handlers on panic
module_shutdown() is a shutdown_post_sync handler, so it also runs on the
panic path after the panicking CPU has stopped the other CPUs. Some
MOD_SHUTDOWN handlers block on kernel threads that cannot run once their
CPU is stopped: vn calls disk_destroy(), and disk_msg_send_sync() then
waits forever for the disk_msg_core thread. The machine hangs after
"Dump complete" and never reboots.
Skip the module shutdown handlers on a panic, as resettodr_on_shutdown()
and shutdown_kproc() already do. The dump is already written when this
handler runs.
Reproduced in a QEMU/NVMM guest: panic + dump with
hw.acpi.handle_reboot=1 hangs at "Dump complete" on SMP and reboots on a
single CPU. With this change the guest reboots with
hw.acpi.handle_reboot 1 and 0, with and without a dump.
Bug: https://bugs.dragonflybsd.org/issues/3450
Summary of changes:
sys/kern/kern_module.c | 4 ++++
1 file changed, 4 insertions(+)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/b2395074a5382b9e20d86353eeab0014a8dc9b52
--
DragonFly BSD source repository
More information about the Commits
mailing list