Commit 69d7d593 authored by Andrew Morton's avatar Andrew Morton Committed by Patrick Mochel

[PATCH] swsusp: kill crash when too much memory is free

From: Pavel Machek <pavel@ucw.cz>

If too much memory is free, swsusp dies in quite a ugly way.  Even when it
is not neccessary to relocate pagedir, it is proably still neccessary to
relocate individual pages.  Thanks to Kurt Garloff and Stefan Seyfried.
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
parent bdf286ba
......@@ -942,9 +942,9 @@ static int __init swsusp_pagedir_relocate(void)
printk("Relocating pagedir ");
if(!does_collide_order(old_pagedir, (unsigned long)old_pagedir, pagedir_order)) {
if (!does_collide_order(old_pagedir, (unsigned long)old_pagedir, pagedir_order)) {
printk("not necessary\n");
return 0;
return check_pagedir();
}
while ((m = (void *) __get_free_pages(GFP_ATOMIC, pagedir_order)) != NULL) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment