diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2022-05-09 13:53:24 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2022-05-18 15:53:53 +0200 |
commit | 68c9c8b192c6dae9be6278e98ee44029d5da2d31 (patch) | |
tree | bc4b1ebe0d0ec25bfff4a8a9a8181f32ad742078 /lib | |
parent | fed7ef061686cc813b1f3d8d0edc6c35b4d3537b (diff) | |
download | linux-68c9c8b192c6dae9be6278e98ee44029d5da2d31.tar.gz linux-68c9c8b192c6dae9be6278e98ee44029d5da2d31.tar.bz2 linux-68c9c8b192c6dae9be6278e98ee44029d5da2d31.zip |
random: move initialization out of reseeding hot path
Initialization happens once -- by way of credit_init_bits() -- and then
it never happens again. Therefore, it doesn't need to be in
crng_reseed(), which is a hot path that is called multiple times. It
also doesn't make sense to have there, as initialization activity is
better associated with initialization routines.
After the prior commit, crng_reseed() now won't be called by multiple
concurrent callers, which means that we can safely move the
"finialize_init" logic into crng_init_bits() unconditionally.
Reviewed-by: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions