From: Herbert Xu Date: Tue, 14 Jul 2009 13:48:35 +0000 (+0800) Subject: crypto: ahash - Use GFP_KERNEL in unaligned setkey X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=093900c2b964da73daf234374225b5ce5d49f941;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 --- diff --git a/crypto/ahash.c b/crypto/ahash.c index 1576f95f9afe..a196055b73d3 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;