summaryrefslogtreecommitdiff
path: root/crypto/keywrap.c
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2021-03-21 22:07:48 -0700
committerHerbert Xu <herbert@gondor.apana.org.au>2021-04-02 18:28:12 +1100
commitbf1e9b3dff85a0433aaea6755c3f8036840dacfb (patch)
treea86778437748287cbb2a7d36f0ca258f1b0073cf /crypto/keywrap.c
parent22063a7484b958ccc83c17445328e08f7b3d46c9 (diff)
downloadlinux-crypto-bf1e9b3dff85a0433aaea6755c3f8036840dacfb.tar.gz
linux-crypto-bf1e9b3dff85a0433aaea6755c3f8036840dacfb.zip
crypto: rng - fix crypto_rng_reset() refcounting when !CRYPTO_STATS
crypto_stats_get() is a no-op when the kernel is compiled without CONFIG_CRYPTO_STATS, so pairing it with crypto_alg_put() unconditionally (as crypto_rng_reset() does) is wrong. Fix this by moving the call to crypto_stats_get() to just before the actual algorithm operation which might need it. This makes it always paired with crypto_stats_rng_seed(). Fixes: 9b91cc7900ce ("crypto: rng - Fix a refcounting bug in crypto_rng_reset()") Cc: stable@vger.kernel.org Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/keywrap.c')
0 files changed, 0 insertions, 0 deletions