]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
shutdown: don't stop the watchdog 22375/head
authorMichael Olbrich <m.olbrich@pengutronix.de>
Wed, 2 Feb 2022 14:33:07 +0000 (15:33 +0100)
committerMichael Olbrich <m.olbrich@pengutronix.de>
Fri, 4 Feb 2022 11:26:58 +0000 (12:26 +0100)
This basically reverts #22079.

Stopping the watchdog is wrong. The reboot watchdog is supposed to cover
the whole time from the point when systemd start systemd-reboot until the
hardware resets.
Otherwise the system may hang in the final shutdown phase.

Add a comment, why keeping the watchdog running is correct here.

src/shutdown/shutdown.c

index 15fd6f93d3127e2a442a7d844cd4ae40b70e1e31..2c3cbec02c840c1253d7751491f7a3bfdd2eb8b2 100644 (file)
@@ -531,8 +531,9 @@ int main(int argc, char *argv[]) {
                           need_md_detach ? " MD devices," : "");
         }
 
-        /* We're done with the watchdog. */
-        watchdog_close(true);
+        /* We're done with the watchdog. Note that the watchdog is explicitly not
+         * stopped here. It remains active to guard against any issues during the
+         * rest of the shutdown sequence. */
         watchdog_free_device();
 
         arguments[0] = NULL;