summaryrefslogtreecommitdiffstats
path: root/crypto/cipher.c
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2023-06-15 17:00:51 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2023-06-23 16:15:36 +0800
commitfa3b3565f3ac5a468e3efebca00e10db5db3d6bb (patch)
tree36aeeb9fdb8d1ea1ff7feddfc7822c3e0e983576 /crypto/cipher.c
parentfa919f9e8857bfe230891a8b7ea6d7f69396cdc5 (diff)
downloadlinux-fa3b3565f3ac5a468e3efebca00e10db5db3d6bb.tar.gz
linux-fa3b3565f3ac5a468e3efebca00e10db5db3d6bb.tar.bz2
linux-fa3b3565f3ac5a468e3efebca00e10db5db3d6bb.zip
crypto: api - Add __crypto_alloc_tfmgfp
Use it straight away in crypto_clone_cipher(), as that is not meant to sleep. Fixes: 51d8d6d0f4be ("crypto: cipher - Add crypto_clone_cipher") Signed-off-by: Dmitry Safonov <dima@arista.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/cipher.c')
-rw-r--r--crypto/cipher.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/cipher.c b/crypto/cipher.c
index d39ef5f72ab8..a5a88038f0d6 100644
--- a/crypto/cipher.c
+++ b/crypto/cipher.c
@@ -101,8 +101,8 @@ struct crypto_cipher *crypto_clone_cipher(struct crypto_cipher *cipher)
if (alg->cra_init)
return ERR_PTR(-ENOSYS);
- ntfm = __crypto_alloc_tfm(alg, CRYPTO_ALG_TYPE_CIPHER,
- CRYPTO_ALG_TYPE_MASK);
+ ntfm = __crypto_alloc_tfmgfp(alg, CRYPTO_ALG_TYPE_CIPHER,
+ CRYPTO_ALG_TYPE_MASK, GFP_ATOMIC);
if (IS_ERR(ntfm))
return ERR_CAST(ntfm);