]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
random: Add a urandom_read_nowait() for random APIs that don't warn
authorAndy Lutomirski <luto@kernel.org>
Mon, 23 Dec 2019 08:20:45 +0000 (00:20 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 25 Jun 2022 09:46:27 +0000 (11:46 +0200)
commit32d4b398c078bc2859dcc1f5e11b89ab0b34ab76
treecbf1f6c2c540cc3798a013cbf3cdbfdc6200b720
parent3a8e277bf9ccf2a87ed46036cf6040df3648ee31
random: Add a urandom_read_nowait() for random APIs that don't warn

commit c6f1deb158789abba02a7eba600747843eeb3a57 upstream.

/dev/random and getrandom() never warn.  Split the meat of
urandom_read() into urandom_read_nowarn() and leave the warning code
in urandom_read().

This has no effect on kernel behavior, but it makes subsequent
patches more straightforward.  It also makes the fact that
getrandom() never warns more obvious.

Signed-off-by: Andy Lutomirski <luto@kernel.org>
Link: https://lore.kernel.org/r/c87ab200588de746431d9f916501ef11e5242b13.1577088521.git.luto@kernel.org
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/char/random.c