crypto: cipher - On clone do crypto_mod_get()
authorDmitry Safonov <dima@arista.com>
Wed, 14 Jun 2023 17:46:43 +0000 (18:46 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 23 Jun 2023 08:15:36 +0000 (16:15 +0800)
commit9979c6e55d2b54ed6e0ce69b6f7faa7889549402
treedc1b6ca9dccd0bfde7199e372af0e34dca083616
parentfa3b3565f3ac5a468e3efebca00e10db5db3d6bb
crypto: cipher - On clone do crypto_mod_get()

The refcounter of underlying algorithm should be incremented, otherwise
it'll be destroyed with the cloned cipher, wrecking the original cipher.

Signed-off-by: Dmitry Safonov <dima@arista.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/cipher.c