Re: [PATCH] crypto: rng - fix crypto_rng_reset() refcounting when !CRYPTO_STATS

2021-04-02 Thread Herbert Xu
Eric Biggers wrote: > From: Eric Biggers > > 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

Re: [PATCH] crypto: rng - fix crypto_rng_reset() refcounting when !CRYPTO_STATS

2021-03-22 Thread LABBE Corentin
Le Mon, Mar 22, 2021 at 10:33:01AM +0300, Dan Carpenter a écrit : > On Sun, Mar 21, 2021 at 11:00:09PM -0700, Eric Biggers wrote: > > On Mon, Mar 22, 2021 at 08:45:22AM +0300, Dan Carpenter wrote: > > > On Sun, Mar 21, 2021 at 10:07:48PM -0700, Eric Biggers wrote: > > > > From: Eric Biggers > > >

Re: [PATCH] crypto: rng - fix crypto_rng_reset() refcounting when !CRYPTO_STATS

2021-03-22 Thread Dan Carpenter
On Sun, Mar 21, 2021 at 11:00:09PM -0700, Eric Biggers wrote: > On Mon, Mar 22, 2021 at 08:45:22AM +0300, Dan Carpenter wrote: > > On Sun, Mar 21, 2021 at 10:07:48PM -0700, Eric Biggers wrote: > > > From: Eric Biggers > > > > > > crypto_stats_get() is a no-op when the kernel is compiled without >

Re: [PATCH] crypto: rng - fix crypto_rng_reset() refcounting when !CRYPTO_STATS

2021-03-21 Thread Eric Biggers
On Mon, Mar 22, 2021 at 08:45:22AM +0300, Dan Carpenter wrote: > On Sun, Mar 21, 2021 at 10:07:48PM -0700, Eric Biggers wrote: > > From: Eric Biggers > > > > crypto_stats_get() is a no-op when the kernel is compiled without > > CONFIG_CRYPTO_STATS, so pairing it with crypto_alg_put() unconditiona

Re: [PATCH] crypto: rng - fix crypto_rng_reset() refcounting when !CRYPTO_STATS

2021-03-21 Thread Dan Carpenter
On Sun, Mar 21, 2021 at 10:07:48PM -0700, Eric Biggers wrote: > From: Eric Biggers > > 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. > Presumably the intention

[PATCH] crypto: rng - fix crypto_rng_reset() refcounting when !CRYPTO_STATS

2021-03-21 Thread Eric Biggers
From: Eric Biggers 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 whi