OSDN Git Service

UPSTREAM: crypto: adiantum - fix leaking reference to hash algorithm
authorEric Biggers <ebiggers@google.com>
Mon, 10 Dec 2018 19:45:58 +0000 (11:45 -0800)
committerEric Biggers <ebiggers@google.com>
Fri, 18 Jan 2019 20:43:35 +0000 (12:43 -0800)
commitb05264180a4d16c5b95cba9e66db33b06c68f032
tree5d98969af1289ddaf893d04acaa108b78419a73a
parentdcdbb165a2383d98507bce78bcf26b969d41af9d
UPSTREAM: crypto: adiantum - fix leaking reference to hash algorithm

crypto_alg_mod_lookup() takes a reference to the hash algorithm but
crypto_init_shash_spawn() doesn't take ownership of it, hence the
reference needs to be dropped in adiantum_create().

Fixes: 059c2a4d8e16 ("crypto: adiantum - add Adiantum support")
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
(cherry picked from commit 00c9fe37a7f27a306bcaa5737f0787fe139f8aba)
Test: Adiantum self-tests
Change-Id: Ic609144bc3c72cc2c4ccbbaf450168193f3df7db
crypto/adiantum.c