Commit 8bb9ab25 authored by Bálint Márton's avatar Bálint Márton Committed by Linus Torvalds

[PATCH] urandom initialisation fix

The urandom driver returns the same thing after every boot.

The urandom pool is only cleared, and not initialized, and because there is
nothing in the primary pool, the reseeding is not successful.  The solution
is also the same, initialize not just the primary and secondary, but also
the urandom pool.
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 48d43bd7
...@@ -1541,6 +1541,7 @@ static int __init rand_initialize(void) ...@@ -1541,6 +1541,7 @@ static int __init rand_initialize(void)
clear_entropy_store(urandom_state); clear_entropy_store(urandom_state);
init_std_data(random_state); init_std_data(random_state);
init_std_data(sec_random_state); init_std_data(sec_random_state);
init_std_data(urandom_state);
#ifdef CONFIG_SYSCTL #ifdef CONFIG_SYSCTL
sysctl_init_random(random_state); sysctl_init_random(random_state);
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment