summaryrefslogtreecommitdiff
path: root/crypto/ahash.c
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
commitff3a3f295bbde4daec55a4dc2100cac82a0847d2 (patch)
tree71c456e0a2ed9a92b6461b875b633626a1f74707 /crypto/ahash.c
parent8af5fce4011f4c997cc38372bc91add21eb5e2fc (diff)
downloadlinux-crypto-ff3a3f295bbde4daec55a4dc2100cac82a0847d2.tar.gz
linux-crypto-ff3a3f295bbde4daec55a4dc2100cac82a0847d2.zip
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>
Diffstat (limited to 'crypto/ahash.c')
-rw-r--r--crypto/ahash.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/ahash.c b/crypto/ahash.c
index 28a33d06..33a4ff45 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;