From: Dom Cobley Date: Wed, 15 Jun 2022 14:54:33 +0000 (+0100) Subject: Revert "random: do not use jump labels before they are initialized" X-Git-Tag: accepted/tizen/unified/20230118.172025~528 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fb9383b7528973f2f234f515c5bb1b46efc51e2d;p=platform%2Fkernel%2Flinux-rpi.git Revert "random: do not use jump labels before they are initialized" This reverts commit 7a2d8599ce48cf25b2c2177139e6ce448525c3e9. --- diff --git a/drivers/char/random.c b/drivers/char/random.c index 136c671..e2f1fce 100644 --- a/drivers/char/random.c +++ b/drivers/char/random.c @@ -727,8 +727,7 @@ static void __cold _credit_init_bits(size_t bits) if (orig < POOL_READY_BITS && new >= POOL_READY_BITS) { crng_reseed(); /* Sets crng_init to CRNG_READY under base_crng.lock. */ - if (static_key_initialized) - execute_in_process_context(crng_set_ready, &set_ready); + execute_in_process_context(crng_set_ready, &set_ready); process_random_ready_list(); wake_up_interruptible(&crng_init_wait); kill_fasync(&fasync, SIGIO, POLL_IN); @@ -844,14 +843,6 @@ int __init random_init(const char *command_line) _mix_pool_bytes(command_line, strlen(command_line)); add_latent_entropy(); - /* - * If we were initialized by the bootloader before jump labels are - * initialized, then we should enable the static branch here, where - * it's guaranteed that jump labels have been initialized. - */ - if (!static_branch_likely(&crng_is_ready) && crng_init >= CRNG_READY) - crng_set_ready(NULL); - if (crng_ready()) crng_reseed(); else if (trust_cpu)