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) ...@@ -581,12 +581,8 @@ static void copy_data_pages(void)
struct page * page; struct page * page;
page = pfn_to_page(zone_pfn + zone->zone_start_pfn); page = pfn_to_page(zone_pfn + zone->zone_start_pfn);
pbe->orig_address = (long) page_address(page); pbe->orig_address = (long) page_address(page);
/* Copy page is dangerous: it likes to mess with /* copy_page is no usable for copying task structs. */
preempt count on specific cpus. Wrong preempt memcpy((void *)pbe->address, (void *)pbe->orig_address, PAGE_SIZE);
count is then copied, oops.
*/
copy_page((void *)pbe->address,
(void *)pbe->orig_address);
pbe++; 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