From 0a537ea467bacdce7eead49a1525cd0e7d91648b Mon Sep 17 00:00:00 2001 From: deraadt Date: Sat, 19 Feb 2022 23:57:09 +0000 Subject: [PATCH] The suspend/resume code sleeps-not-allowed phases are protected with cold=2. Use the same strategy in a a similar phase during hibernate. --- sys/kern/subr_hibernate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/kern/subr_hibernate.c b/sys/kern/subr_hibernate.c index f2abf7cb8bf..d1c967dcda2 100644 --- a/sys/kern/subr_hibernate.c +++ b/sys/kern/subr_hibernate.c @@ -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 @@ -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) { -- 2.20.1