aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/highmem.h
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 /include/linux/highmem.h
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 'include/linux/highmem.h')
-rw-r--r--include/linux/highmem.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/highmem.h b/include/linux/highmem.h
index e3060ef85b6d..283cd47bb34c 100644
--- a/include/linux/highmem.h
+++ b/include/linux/highmem.h
@@ -201,8 +201,8 @@ static inline void copy_user_highpage(struct page *to, struct page *from,
201 vfrom = kmap_atomic(from, KM_USER0); 201 vfrom = kmap_atomic(from, KM_USER0);
202 vto = kmap_atomic(to, KM_USER1); 202 vto = kmap_atomic(to, KM_USER1);
203 copy_user_page(vto, vfrom, vaddr, to); 203 copy_user_page(vto, vfrom, vaddr, to);
204 kunmap_atomic(vfrom, KM_USER0);
205 kunmap_atomic(vto, KM_USER1); 204 kunmap_atomic(vto, KM_USER1);
205 kunmap_atomic(vfrom, KM_USER0);
206} 206}
207 207
208#endif 208#endif
@@ -214,8 +214,8 @@ static inline void copy_highpage(struct page *to, struct page *from)
214 vfrom = kmap_atomic(from, KM_USER0); 214 vfrom = kmap_atomic(from, KM_USER0);
215 vto = kmap_atomic(to, KM_USER1); 215 vto = kmap_atomic(to, KM_USER1);
216 copy_page(vto, vfrom); 216 copy_page(vto, vfrom);
217 kunmap_atomic(vfrom, KM_USER0);
218 kunmap_atomic(vto, KM_USER1); 217 kunmap_atomic(vto, KM_USER1);
218 kunmap_atomic(vfrom, KM_USER0);
219} 219}
220 220
221#endif /* _LINUX_HIGHMEM_H */ 221#endif /* _LINUX_HIGHMEM_H */