-mm swsusp: copy_page is harmfull
Subsystems (2)
Hi!
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. Please apply,
Pavel
kernel/power/swsusp.c +2 -6
@@ -614,12 +614,8 @@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++; } }
Signature · 2 lines
People were complaining that M$ turns users into beta-testers... ...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!