random: do not take pool spinlock at boot
authorJason A. Donenfeld <Jason@zx2c4.com>
Sat, 12 Feb 2022 00:26:17 +0000 (01:26 +0100)
committerJason A. Donenfeld <Jason@zx2c4.com>
Mon, 21 Feb 2022 20:14:17 +0000 (21:14 +0100)
commitafba0b80b977b2a8f16234f2acd982f82710ba33
tree99864ad1e0b16d744af6e4b393c53a8fd709c051
parent58340f8e952b613e0ead0bed58b97b05bf4743c5
random: do not take pool spinlock at boot

Since rand_initialize() is run while interrupts are still off and
nothing else is running, we don't need to repeatedly take and release
the pool spinlock, especially in the RDSEED loop.

Reviewed-by: Eric Biggers <ebiggers@google.com>
Reviewed-by: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
drivers/char/random.c