summaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorJia-Ju Bai <baijiaju1990@gmail.com>2018-01-25 10:57:54 +0100
committerHerbert Xu <herbert@gondor.apana.org.au>2018-02-15 16:26:47 +0100
commit1ca2809897155f1adc43e4859b4a3582e235c09a (patch)
treeefd82bd91aff83220967913a3783b8dab3cb4831 /crypto
parentcrypto: sha512-mb - remove HASH_FIRST flag (diff)
downloadlinux-1ca2809897155f1adc43e4859b4a3582e235c09a.tar.xz
linux-1ca2809897155f1adc43e4859b4a3582e235c09a.zip
crypto: rsa-pkcs1pad - Replace GFP_ATOMIC with GFP_KERNEL in pkcs1pad_encrypt_sign_complete
After checking all possible call chains to kzalloc here, my tool finds that this kzalloc is never called in atomic context. Thus GFP_ATOMIC is not necessary, and it can be replaced with GFP_KERNEL. This is found by a static analysis tool named DCNS written by myself. Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com> 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 2908f93c3e55..9893dbfc1af4 100644
--- a/crypto/rsa-pkcs1pad.c
+++ b/crypto/rsa-pkcs1pad.c
@@ -192,7 +192,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_ATOMIC);
+ out_buf = kzalloc(ctx->key_size, GFP_KERNEL);
err = -ENOMEM;
if (!out_buf)
goto out;