The patch titled swsusp: prevent possible image corruption on resume has been added to the -mm tree. Its filename is swsusp-prevent-possible-image-corruption-on-resume.patch See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this From: "Rafael J. Wysocki" <rjw@xxxxxxx> The function free_pagedir() used by swsusp for freeing its internal data structures clears the PG_nosave and PG_nosave_free flags for each page being freed. However, during resume PG_nosave_free set means that the page in question is "unsafe" (ie. it will be overwritten in the process of restoring the saved system state from the image), so it should not be used for the image data. Therefore free_pagedir() should not clear PG_nosave_free if it's called during resume (otherwise "unsafe" pages freed by it may be used for storing the image data and the data may get corrupted later on). Signed-off-by: Rafael J. Wysocki <rjw@xxxxxxx> Acked-by: Pavel Machek <pavel@xxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- kernel/power/snapshot.c | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) diff -puN kernel/power/snapshot.c~swsusp-prevent-possible-image-corruption-on-resume kernel/power/snapshot.c --- devel/kernel/power/snapshot.c~swsusp-prevent-possible-image-corruption-on-resume 2006-04-17 21:32:28.000000000 -0700 +++ devel-akpm/kernel/power/snapshot.c 2006-04-17 21:32:28.000000000 -0700 @@ -338,14 +338,15 @@ static void copy_data_pages(struct pbe * * free_pagedir - free pages allocated with alloc_pagedir() */ -static void free_pagedir(struct pbe *pblist) +static void free_pagedir(struct pbe *pblist, int clear_nosave_free) { struct pbe *pbe; while (pblist) { pbe = (pblist + PB_PAGE_SKIP)->next; ClearPageNosave(virt_to_page(pblist)); - ClearPageNosaveFree(virt_to_page(pblist)); + if (clear_nosave_free) + ClearPageNosaveFree(virt_to_page(pblist)); free_page((unsigned long)pblist); pblist = pbe; } @@ -487,7 +488,7 @@ struct pbe *alloc_pagedir(unsigned int n pbe->next = alloc_image_page(gfp_mask, safe_needed); } if (!pbe) { /* get_zeroed_page() failed */ - free_pagedir(pblist); + free_pagedir(pblist, 1); pblist = NULL; } else create_pbe_list(pblist, nr_pages); @@ -834,7 +835,7 @@ static int create_image(struct snapshot_ pblist = alloc_pagedir(nr_copy_pages, GFP_ATOMIC, 1); if (pblist) copy_page_backup_list(pblist, p); - free_pagedir(p); + free_pagedir(p, 0); if (!pblist) error = -ENOMEM; } _ Patches currently in -mm which might be from rjw@xxxxxxx are origin.patch swsusp-prevent-possible-image-corruption-on-resume.patch swsusp-add-architecture-special-saveable-pages-support.patch swsusp-i386-mark-special-saveable-unsaveable-pages.patch swsusp-x86_64-mark-special-saveable-unsaveable-pages.patch swsusp-take-lowmem-reserves-into-account.patch pnp-fix-two-messages-in-managerc.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html