(I'm so sorry!) Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git

crypto: api - Fix DUP_FIRST crash on unregister

The flag CRYPTO_ALG_DUP_FIRST is buggy because upon unregistration it tries to unregister the original algorithm rather than the duplicate which was allocated during registration. Fix this by locating the duplicated algorithm and unregistering that instead of the original. Also remove the duplicate crypto_destroy_alg call. Reported-by: Chenghai Huang <huangchenghai2@huawei.com> Fixes: f1440a90465b ("crypto: api - Add support for duplicating algorithms before registration") Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>


Author Herbert Xu Date Commit Parent 4e721fe9
+22 -1
1 changed file
+22 -1
1 changed file