[PATCH] swsusp: do not use memcpy for snapshotting memory
authorRafael J. Wysocki <rjw@sisk.pl>
Mon, 10 Jul 2006 11:45:00 +0000 (04:45 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Mon, 10 Jul 2006 20:24:22 +0000 (13:24 -0700)
commit95018f7c94cbe4e78fc014b6ce52004714c06e2a
tree2f8434103bc670813120e6d64b1726301a6021ac
parent7ba1c6c88c945b065a75094830f6b76f414e42ad
[PATCH] swsusp: do not use memcpy for snapshotting memory

swsusp should not use memcpy for snapshotting memory, because on some
architectures memcpy may increase preempt_count (i386 does this when
CONFIG_X86_USE_3DNOW is set).  Then, as a result, wrong value of preempt_count
is stored in the image.

Replace memcpy in copy_data_pages with an open-coded loop.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
kernel/power/snapshot.c