random: early_random: Fix races when initializing random pools
Recent random.c upstream introduced random pools init race. As Jason A. Donenfeld suggests, update the early_random to fix this issue Suggested-by: Jason A. Donenfeld <Jason@zx2c4.com> Co-authored-by: Jason A. Donenfeld <Jason@zx2c4.com> Signed-off-by: Reinazhard <reinazhard@gmail.com> Change-Id: I104bbbb13e55ffbc0f85cc4fdf3cdaaadfdb76b5
This commit is contained in:
parent
a23217cd7d
commit
3ea8ab7387
@ -49,8 +49,7 @@ void __init init_random_pool(void)
|
||||
RANDOM_BUFFER_SIZE);
|
||||
bytes_received = (bytes_received <= RANDOM_BUFFER_SIZE) ?
|
||||
bytes_received : RANDOM_BUFFER_SIZE;
|
||||
add_hwgenerator_randomness(random_buffer, bytes_received,
|
||||
bytes_received << 3);
|
||||
add_bootloader_randomness(random_buffer, bytes_received);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user