Message ID | CAHmME9qp5J6yhj+TYtZEhC-snqWB85gdYQ1=-eUysaYT8BkgwQ@mail.gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/drivers/char/random.c b/drivers/char/random.c index 12758db..5252690 100644 --- a/drivers/char/random.c +++ b/drivers/char/random.c @@ -2061,8 +2061,8 @@ static DEFINE_PER_CPU(struct batched_entropy, batched_entropy_u64); u64 get_random_u64(void) { u64 ret; - bool use_lock = crng_init < 2; - unsigned long flags; + const bool use_lock = READ_ONCE(crng_init) < 2; + unsigned long flags = 0; struct batched_entropy *batch;