Commit 093900c2 authored by Herbert Xu's avatar Herbert Xu

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: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 0e2d3a12
...@@ -145,7 +145,7 @@ static int ahash_setkey_unaligned(struct crypto_ahash *tfm, const u8 *key, ...@@ -145,7 +145,7 @@ static int ahash_setkey_unaligned(struct crypto_ahash *tfm, const u8 *key,
unsigned long absize; unsigned long absize;
absize = keylen + alignmask; absize = keylen + alignmask;
buffer = kmalloc(absize, GFP_ATOMIC); buffer = kmalloc(absize, GFP_KERNEL);
if (!buffer) if (!buffer)
return -ENOMEM; return -ENOMEM;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment