|
@@ -906,7 +906,7 @@ static void crng_reseed(struct crng_state *crng, struct entropy_store *r)
|
|
|
_crng_backtrack_protect(&primary_crng, buf.block,
|
|
|
CHACHA20_KEY_SIZE);
|
|
|
}
|
|
|
- spin_lock_irqsave(&primary_crng.lock, flags);
|
|
|
+ spin_lock_irqsave(&crng->lock, flags);
|
|
|
for (i = 0; i < 8; i++) {
|
|
|
unsigned long rv;
|
|
|
if (!arch_get_random_seed_long(&rv) &&
|
|
@@ -916,7 +916,7 @@ static void crng_reseed(struct crng_state *crng, struct entropy_store *r)
|
|
|
}
|
|
|
memzero_explicit(&buf, sizeof(buf));
|
|
|
crng->init_time = jiffies;
|
|
|
- spin_unlock_irqrestore(&primary_crng.lock, flags);
|
|
|
+ spin_unlock_irqrestore(&crng->lock, flags);
|
|
|
if (crng == &primary_crng && crng_init < 2) {
|
|
|
invalidate_batched_entropy();
|
|
|
numa_crng_init();
|