That's distressing, for both and all of us: I'm sorry.
Embarrassing: I suspect that I've been confused, not for the first
time, by the fork-like nature of hibernation and its images.
I wonder if this patch below fixes it, Ondrej?
(And is it kernel swsusp or user swsusp that you're using? May not
matter at all, but will help us to think more clearly about it,
if the corruption remains after this patch.)
Rafael, do you agree that this patch was actually required even for
your original commit 452aa6999e6703ffbddd7f6ea124d3968915f3e3
mm/pm: force GFP_NOIO during suspend/hibernation and resume?
Or am I still just as confused? Or if not, are there more forking
places which require a similar patch?
Not signing it off yet,
Hugh
---
kernel/power/hibernate.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
--- 2.6.37-rc2/kernel/power/hibernate.c 2010-11-01 13:01:31.000000000 -0700
+++ linux/kernel/power/hibernate.c 2010-11-17 15:23:36.000000000 -0800
@@ -348,16 +348,19 @@ int hibernation_snapshot(int platform_mo
goto Recover_platform;
error = create_image(platform_mode);
- /* Control returns here after successful restore */
+ /* Control returns here after successful restore,
+ * and also after creating the image in memory (or failing to do so).
+ */
Resume_devices:
/* We may need to release the preallocated image pages here. */
- if (error || !in_suspend)
+ if (error || !in_suspend) {
swsusp_free();
+ set_gfp_allowed_mask(saved_mask);
+ }
dpm_resume_end(in_suspend ?
(error ? PMSG_RECOVER : PMSG_THAW) : PMSG_RESTORE);
- set_gfp_allowed_mask(saved_mask);
resume_console();
Close:
platform_end(platform_mode);
--