summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2009-07-14 21:48:35 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2009-07-14 21:48:35 +0800
commit093900c2b964da73daf234374225b5ce5d49f941 (patch)
treeaba7bd1240004a6a13c5b7c4f24248777c205699
parent0e2d3a126338ebb213c8e32d8d1d8936d8e62d43 (diff)
downloadlinux-3.10-093900c2b964da73daf234374225b5ce5d49f941.tar.gz
linux-3.10-093900c2b964da73daf234374225b5ce5d49f941.tar.bz2
linux-3.10-093900c2b964da73daf234374225b5ce5d49f941.zip
crypto: ahash - Use GFP_KERNEL in unaligned setkey
We currently use GFP_ATOMIC in the unaligned setkey function to allocate the temporary aligned buffer. Since setkey must be called in a sleepable context, we can use GFP_KERNEL instead. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
-rw-r--r--crypto/ahash.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/ahash.c b/crypto/ahash.c
index 1576f95f9af..a196055b73d 100644
--- a/crypto/ahash.c
+++ b/crypto/ahash.c
@@ -145,7 +145,7 @@ static int ahash_setkey_unaligned(struct crypto_ahash *tfm, const u8 *key,
unsigned long absize;
absize = keylen + alignmask;
- buffer = kmalloc(absize, GFP_ATOMIC);
+ buffer = kmalloc(absize, GFP_KERNEL);
if (!buffer)
return -ENOMEM;