crypto: virtio/akcipher - Do not use GFP_ATOMIC when not needed
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sat, 4 Feb 2023 20:54:08 +0000 (21:54 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 10 Feb 2023 09:20:19 +0000 (17:20 +0800)
There is no need to use GFP_ATOMIC here. GFP_KERNEL is already used for
another memory allocation just the line after.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/virtio/virtio_crypto_akcipher_algs.c

index b2979be613b8f5cb1f0d0194216b8d1c6ff00d5c..6963344f6a3aabadfc79b4e4e76223d31bdbcae0 100644 (file)
@@ -116,7 +116,7 @@ static int virtio_crypto_alg_akcipher_init_session(struct virtio_crypto_akcipher
        struct virtio_crypto_session_input *input;
        struct virtio_crypto_ctrl_request *vc_ctrl_req;
 
-       pkey = kmemdup(key, keylen, GFP_ATOMIC);
+       pkey = kmemdup(key, keylen, GFP_KERNEL);
        if (!pkey)
                return -ENOMEM;