From 882821b78faecaffdecac8fdcd943ee2e1053ee7 Mon Sep 17 00:00:00 2001 From: Justin Hibbits Date: Mon, 1 Dec 2025 11:50:30 -0500 Subject: [PATCH] kexec: Change shutdown handler priority The kexec shutdown handler should run after everything else, but before the other platform shutdown handlers. With (SHUTDOWN_PRI_DEFAULT - 150) priority it would run before anything else, including all the device shutdown handlers. Change to (SHUTDOWN_PRI_LAST - 150) where it belongs. Sponsored by: Hewlett Packard Enterprise --- sys/kern/kern_kexec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/kern_kexec.c b/sys/kern/kern_kexec.c index 2efea7dcf9a..86ee9da9a60 100644 --- a/sys/kern/kern_kexec.c +++ b/sys/kern/kern_kexec.c @@ -314,7 +314,7 @@ kern_kexec_load(struct thread *td, u_long entry, u_long nseg, if (kexec_reboot_handler == NULL) kexec_reboot_handler = EVENTHANDLER_REGISTER(shutdown_final, kexec_reboot, NULL, - SHUTDOWN_PRI_DEFAULT - 150); + SHUTDOWN_PRI_LAST - 150); } else { if (kexec_reboot_handler != NULL) EVENTHANDLER_DEREGISTER(shutdown_final, kexec_reboot_handler);