]> git.baikalelectronics.ru Git - kernel.git/commit
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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 30 May 2022 07:29:08 +0000 (09:29 +0200)
commite41db510577204130f92b16e2cd06ba10fd194cd
treeaca9c6bedf5b948402e085db191cc274ca9da4ad
parentf97e0dd4b63dc85cc57fb435ccb9b7b71e2db2a0
random: do not take pool spinlock at boot

commit e372e015015f7cd9ac32e4723c67b522a186eed8 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/char/random.c