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>
Wed, 16 Feb 2022 23:03:52 +0000 (00:03 +0100)
commit7789a5f6455d4b23f0374126073bd14a84fcef77
tree923b3a42a23f34a7065ae1d3cda87ef99b8a2403
parent7181498d0073735ff1e1123f864c6af6884b4a1c
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: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
drivers/char/random.c