The suspend/resume code sleeps-not-allowed phases are protected with
authorderaadt <deraadt@openbsd.org>
Sat, 19 Feb 2022 23:57:09 +0000 (23:57 +0000)
committerderaadt <deraadt@openbsd.org>
Sat, 19 Feb 2022 23:57:09 +0000 (23:57 +0000)
cold=2.  Use the same strategy in a a similar phase during hibernate.

sys/kern/subr_hibernate.c

index f2abf7c..d1c967d 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: subr_hibernate.c,v 1.133 2022/01/17 02:54:28 mlarkin Exp $    */
+/*     $OpenBSD: subr_hibernate.c,v 1.134 2022/02/19 23:57:09 deraadt Exp $    */
 
 /*
  * Copyright (c) 2011 Ariane van der Steldt <ariane@stack.nl>
@@ -1184,7 +1184,7 @@ hibernate_resume(void)
 
        (void) splhigh();
        hibernate_disable_intr_machdep();
-       cold = 1;
+       cold = 2;
 
        DPRINTF("hibernate: suspending devices\n");
        if (config_suspend_all(DVACT_SUSPEND) != 0) {