summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2022-06-08 10:31:25 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2022-06-10 11:29:48 +0200
commite052a478a7daeca67664f7addd308ff51dd40654 (patch)
tree5c34367f464a6317ab8014e345f734a3ca2ad95d /lib
parent846bb97e131d7938847963cca00657c995b1fce1 (diff)
random: remove rng_has_arch_random()
With arch randomness being used by every distro and enabled in defconfigs, the distinction between rng_has_arch_random() and rng_is_initialized() is now rather small. In fact, the places where they differ are now places where paranoid users and system builders really don't want arch randomness to be used, in which case we should respect that choice, or places where arch randomness is known to be broken, in which case that choice is all the more important. So this commit just removes the function and its one user. Reviewed-by: Petr Mladek <pmladek@suse.com> # for vsprintf.c Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/vsprintf.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/vsprintf.c b/lib/vsprintf.c
index fb77f7bfd126..3c1853a9d1c0 100644
--- a/lib/vsprintf.c
+++ b/lib/vsprintf.c
@@ -769,8 +769,7 @@ static inline int __ptr_to_hashval(const void *ptr, unsigned long *hashval_out)
static DECLARE_WORK(enable_ptr_key_work, enable_ptr_key_workfn);
unsigned long flags;
- if (!system_unbound_wq ||
- (!rng_is_initialized() && !rng_has_arch_random()) ||
+ if (!system_unbound_wq || !rng_is_initialized() ||
!spin_trylock_irqsave(&filling, flags))
return -EAGAIN;