do so.
Freeing the hibernate structures too early leads to inadvertent calls into
splx when we aren't ready for them yet. Found when trapping splx calls in
the resume path.
discussed with deraadt@ at m2k14
-/* $OpenBSD: acpi_machdep.c,v 1.59 2014/03/27 10:24:40 dlg Exp $ */
+/* $OpenBSD: acpi_machdep.c,v 1.60 2014/04/25 14:37:06 mlarkin Exp $ */
/*
* Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com>
*
}
/* Resume path */
-#ifdef HIBERNATE
- if (state == ACPI_STATE_S4) {
- hibernate_free();
- uvm_pmr_dirty_everything();
- }
-#endif
-
/* Reset the vectors */
sc->sc_facs->wakeup_vector = 0;
if (sc->sc_facs->length > 32 && sc->sc_facs->version >= 1)
-/* $OpenBSD: acpi_machdep.c,v 1.52 2014/03/13 03:52:55 dlg Exp $ */
+/* $OpenBSD: acpi_machdep.c,v 1.53 2014/04/25 14:37:06 mlarkin Exp $ */
/*
* Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com>
*
}
/* Resume path */
-#ifdef HIBERNATE
- if (state == ACPI_STATE_S4) {
- hibernate_free();
- uvm_pmr_dirty_everything();
- }
-#endif
-
/* Reset the vectors */
sc->sc_facs->wakeup_vector = 0;
if (sc->sc_facs->length > 32 && sc->sc_facs->version >= 1)
-/* $OpenBSD: acpi.c,v 1.256 2014/04/13 14:43:01 mlarkin Exp $ */
+/* $OpenBSD: acpi.c,v 1.257 2014/04/25 14:37:06 mlarkin Exp $ */
/*
* Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com>
* Copyright (c) 2005 Jordan Hargrave <jordan@openbsd.org>
acpi_record_event(sc, APM_NORMAL_RESUME);
acpi_indicator(sc, ACPI_SST_WORKING);
+
+#ifdef HIBERNATE
+ if (state == ACPI_STATE_S4) {
+ hibernate_free();
+ uvm_pmr_dirty_everything();
+ }
+#endif /* HIBERNATE */
+
fail_tts:
return (error);
}