aboutsummaryrefslogtreecommitdiffstats
path: root/crypto
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 /crypto
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 'crypto')
-rw-r--r--crypto/async_tx/async_memcpy.c2
-rw-r--r--crypto/blkcipher.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/crypto/async_tx/async_memcpy.c b/crypto/async_tx/async_memcpy.c
index 0ec1fb69d4ea..518c22bd9562 100644
--- a/crypto/async_tx/async_memcpy.c
+++ b/crypto/async_tx/async_memcpy.c
@@ -83,8 +83,8 @@ async_memcpy(struct page *dest, struct page *src, unsigned int dest_offset,
83 83
84 memcpy(dest_buf, src_buf, len); 84 memcpy(dest_buf, src_buf, len);
85 85
86 kunmap_atomic(dest_buf, KM_USER0);
87 kunmap_atomic(src_buf, KM_USER1); 86 kunmap_atomic(src_buf, KM_USER1);
87 kunmap_atomic(dest_buf, KM_USER0);
88 88
89 async_tx_sync_epilog(submit); 89 async_tx_sync_epilog(submit);
90 } 90 }
diff --git a/crypto/blkcipher.c b/crypto/blkcipher.c
index 90d26c91f4e9..7a7219266e3c 100644
--- a/crypto/blkcipher.c
+++ b/crypto/blkcipher.c
@@ -89,9 +89,9 @@ static inline unsigned int blkcipher_done_fast(struct blkcipher_walk *walk,
89 memcpy(walk->dst.virt.addr, walk->page, n); 89 memcpy(walk->dst.virt.addr, walk->page, n);
90 blkcipher_unmap_dst(walk); 90 blkcipher_unmap_dst(walk);
91 } else if (!(walk->flags & BLKCIPHER_WALK_PHYS)) { 91 } else if (!(walk->flags & BLKCIPHER_WALK_PHYS)) {
92 blkcipher_unmap_src(walk);
93 if (walk->flags & BLKCIPHER_WALK_DIFF) 92 if (walk->flags & BLKCIPHER_WALK_DIFF)
94 blkcipher_unmap_dst(walk); 93 blkcipher_unmap_dst(walk);
94 blkcipher_unmap_src(walk);
95 } 95 }
96 96
97 scatterwalk_advance(&walk->in, n); 97 scatterwalk_advance(&walk->in, n);