summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/loongson/dev/apm.c5
-rw-r--r--sys/arch/zaurus/dev/zaurus_apm.c5
2 files changed, 8 insertions, 2 deletions
diff --git a/sys/arch/loongson/dev/apm.c b/sys/arch/loongson/dev/apm.c
index 5ab046491cc..49a597ab712 100644
--- a/sys/arch/loongson/dev/apm.c
+++ b/sys/arch/loongson/dev/apm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: apm.c,v 1.25 2014/10/31 07:59:27 jsg Exp $ */
+/* $OpenBSD: apm.c,v 1.26 2014/12/18 20:01:33 deraadt Exp $ */
/*-
* Copyright (c) 2001 Alexander Guy. All rights reserved.
@@ -383,6 +383,8 @@ apm_suspend(int state)
rv = config_suspend_all(DVACT_SUSPEND);
+ suspend_randomness();
+
#ifdef HIBERNATE
if (state == APM_IOC_HIBERNATE) {
uvm_pmr_zero_everything();
@@ -415,6 +417,7 @@ apm_suspend(int state)
(void)enableintr();
splx(s);
+ resume_randomness(); /* force RNG upper level reseed */
bufq_restart();
config_suspend_all(DVACT_WAKEUP);
diff --git a/sys/arch/zaurus/dev/zaurus_apm.c b/sys/arch/zaurus/dev/zaurus_apm.c
index 16bad432c87..58076254fa4 100644
--- a/sys/arch/zaurus/dev/zaurus_apm.c
+++ b/sys/arch/zaurus/dev/zaurus_apm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: zaurus_apm.c,v 1.28 2014/09/20 09:28:24 kettenis Exp $ */
+/* $OpenBSD: zaurus_apm.c,v 1.29 2014/12/18 20:01:33 deraadt Exp $ */
/*
* Copyright (c) 2005 Uwe Stuehler <uwe@bsdx.de>
@@ -657,6 +657,8 @@ zapm_poweroff(void)
s = splhigh();
config_suspend_all(DVACT_SUSPEND);
+ suspend_randomness();
+
/* XXX
* Flag to disk drivers that they should "power down" the disk
* when we get to DVACT_POWERDOWN.
@@ -687,6 +689,7 @@ zapm_poweroff(void)
config_suspend_all(DVACT_RESUME);
splx(s);
+ resume_randomness(); /* force RNG upper level reseed */
bufq_restart();
config_suspend_all(DVACT_WAKEUP);