aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/power
diff options
context:
space:
mode:
authorPeter Zijlstra <a.p.zijlstra@chello.nl>2010-10-26 17:21:47 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-10-26 19:52:08 -0400
commit61ecdb801ef2cd28e32442383106d7837d76deac (patch)
tree3ec4f04e09cc4a9b76dafaaa0c4dfd07e825e632 /kernel/power
parent2e30244a7cc1ff09013a1238d415b4076406388e (diff)
mm: strictly nested kmap_atomic()
Ensure kmap_atomic() usage is strictly nested Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Reviewed-by: Rik van Riel <riel@redhat.com> Acked-by: Chris Metcalf <cmetcalf@tilera.com> Cc: David Howells <dhowells@redhat.com> Cc: Hugh Dickins <hughd@google.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Russell King <rmk@arm.linux.org.uk> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: David Miller <davem@davemloft.net> Cc: Paul Mackerras <paulus@samba.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/power')
-rw-r--r--kernel/power/snapshot.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/power/snapshot.c b/kernel/power/snapshot.c
index ac7eb109f196..9e3581f4619a 100644
--- a/kernel/power/snapshot.c
+++ b/kernel/power/snapshot.c
@@ -984,8 +984,8 @@ static void copy_data_page(unsigned long dst_pfn, unsigned long src_pfn)
984 src = kmap_atomic(s_page, KM_USER0); 984 src = kmap_atomic(s_page, KM_USER0);
985 dst = kmap_atomic(d_page, KM_USER1); 985 dst = kmap_atomic(d_page, KM_USER1);
986 do_copy_page(dst, src); 986 do_copy_page(dst, src);
987 kunmap_atomic(src, KM_USER0);
988 kunmap_atomic(dst, KM_USER1); 987 kunmap_atomic(dst, KM_USER1);
988 kunmap_atomic(src, KM_USER0);
989 } else { 989 } else {
990 if (PageHighMem(d_page)) { 990 if (PageHighMem(d_page)) {
991 /* Page pointed to by src may contain some kernel 991 /* Page pointed to by src may contain some kernel
@@ -2273,8 +2273,8 @@ swap_two_pages_data(struct page *p1, struct page *p2, void *buf)
2273 memcpy(buf, kaddr1, PAGE_SIZE); 2273 memcpy(buf, kaddr1, PAGE_SIZE);
2274 memcpy(kaddr1, kaddr2, PAGE_SIZE); 2274 memcpy(kaddr1, kaddr2, PAGE_SIZE);
2275 memcpy(kaddr2, buf, PAGE_SIZE); 2275 memcpy(kaddr2, buf, PAGE_SIZE);
2276 kunmap_atomic(kaddr1, KM_USER0);
2277 kunmap_atomic(kaddr2, KM_USER1); 2276 kunmap_atomic(kaddr2, KM_USER1);
2277 kunmap_atomic(kaddr1, KM_USER0);
2278} 2278}
2279 2279
2280/** 2280/**