Commit f832c11d authored by Andrew Morton's avatar Andrew Morton Committed by Patrick Mochel

[PATCH] -mm swsusp: copy_page is harmfull

From: Pavel Machek <pavel@ucw.cz>

This is my fault from long time ago: copy_page can't be used for copying
task struct, therefore we can't use it in swsusp.
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
parent a0eb3a40
......@@ -581,12 +581,8 @@ static void copy_data_pages(void)
struct page * page;
page = pfn_to_page(zone_pfn + zone->zone_start_pfn);
pbe->orig_address = (long) page_address(page);
/* Copy page is dangerous: it likes to mess with
preempt count on specific cpus. Wrong preempt
count is then copied, oops.
*/
copy_page((void *)pbe->address,
(void *)pbe->orig_address);
/* copy_page is no usable for copying task structs. */
memcpy((void *)pbe->address, (void *)pbe->orig_address, PAGE_SIZE);
pbe++;
}
}
......
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