aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteffen Klassert <steffen.klassert@secunet.com>2009-07-24 13:56:31 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2009-07-24 13:56:31 +0800
commit5befbd5a7e9c814d145f15b4281c88da96fb1aa9 (patch)
tree0fd9e4a8e95b1e487742ad3c23e3f2bc188a82ac
parentf592682f9fca18d336ac068a1abc8507b4a1d936 (diff)
downloadkernel_samsung_espresso10-5befbd5a7e9c814d145f15b4281c88da96fb1aa9.zip
kernel_samsung_espresso10-5befbd5a7e9c814d145f15b4281c88da96fb1aa9.tar.gz
kernel_samsung_espresso10-5befbd5a7e9c814d145f15b4281c88da96fb1aa9.tar.bz2
crypto: ahash - Use GFP_KERNEL on allocation if the request can sleep
ahash_op_unaligned() and ahash_def_finup() allocate memory atomically, regardless whether the request can sleep or not. This patch changes this to use GFP_KERNEL if the request can sleep. Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
-rw-r--r--crypto/ahash.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/ahash.c b/crypto/ahash.c
index 28a33d0..33a4ff4 100644
--- a/crypto/ahash.c
+++ b/crypto/ahash.c
@@ -223,7 +223,7 @@ static int ahash_op_unaligned(struct ahash_request *req,
priv = kmalloc(sizeof(*priv) + ahash_align_buffer_size(ds, alignmask),
(req->base.flags & CRYPTO_TFM_REQ_MAY_SLEEP) ?
- GFP_ATOMIC : GFP_ATOMIC);
+ GFP_KERNEL : GFP_ATOMIC);
if (!priv)
return -ENOMEM;
@@ -333,7 +333,7 @@ static int ahash_def_finup(struct ahash_request *req)
priv = kmalloc(sizeof(*priv) + ahash_align_buffer_size(ds, alignmask),
(req->base.flags & CRYPTO_TFM_REQ_MAY_SLEEP) ?
- GFP_ATOMIC : GFP_ATOMIC);
+ GFP_KERNEL : GFP_ATOMIC);
if (!priv)
return -ENOMEM;