summaryrefslogtreecommitdiff
path: root/crypto
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2023-01-23 18:08:56 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2023-02-03 12:54:54 +0800
commit10b6e08a0ed0c9cee06932b4efaba21483e9a9a2 (patch)
treea0dd64b2d33f0d792725767d434b3868ae7f6748 /crypto
parent643552d5aa223decbb7a5724a8bf51376a585c2f (diff)
downloadlinux-crypto-10b6e08a0ed0c9cee06932b4efaba21483e9a9a2.tar.gz
linux-crypto-10b6e08a0ed0c9cee06932b4efaba21483e9a9a2.zip
Revert "crypto: rsa-pkcs1pad - Replace GFP_ATOMIC with GFP_KERNEL in pkcs1pad_encrypt_sign_complete"
This reverts commit 4e92247a228c2d2c8a063842aa3dad2b0c9256f3. While the akcipher API as a whole is designed to be called only from thread context, its completion path is still called from softirq context as usual. Therefore we must not use GFP_KERNEL on that path. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto')
-rw-r--r--crypto/rsa-pkcs1pad.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/rsa-pkcs1pad.c b/crypto/rsa-pkcs1pad.c
index 6ee5b8a0..141f7e08 100644
--- a/crypto/rsa-pkcs1pad.c
+++ b/crypto/rsa-pkcs1pad.c
@@ -190,7 +190,7 @@ static int pkcs1pad_encrypt_sign_complete(struct akcipher_request *req, int err)
if (likely(!pad_len))
goto out;
- out_buf = kzalloc(ctx->key_size, GFP_KERNEL);
+ out_buf = kzalloc(ctx->key_size, GFP_ATOMIC);
err = -ENOMEM;
if (!out_buf)
goto out;