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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Mar 21, 2021 at 10:07:48PM -0700, Eric Biggers wrote:
> From: Eric Biggers <ebiggers@xxxxxxxxxx>
> 
> 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 was that _get() and _put() should always pair.
It's really ugly and horrible that they don't. We could have
predicted bug like this would happen and will continue to happen until
the crypto_stats_get() is renamed.

regards,
dan carpenter




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux