Defer the free of the hibernate structures until later, when it is safe to
authormlarkin <mlarkin@openbsd.org>
Fri, 25 Apr 2014 14:37:06 +0000 (14:37 +0000)
committermlarkin <mlarkin@openbsd.org>
Fri, 25 Apr 2014 14:37:06 +0000 (14:37 +0000)
commitec527653e3c18ef7989803fe457b94c85d781ed3
tree9055125b66775f81f307d33f714da84ffe51772e
parent9f85492fd9661579c137fdf3db1a8a2a648dd0d3
Defer the free of the hibernate structures until later, when it is safe to
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
sys/arch/amd64/amd64/acpi_machdep.c
sys/arch/i386/i386/acpi_machdep.c
sys/dev/acpi/acpi.c