From 28dcd63ec88da85c14041e1c737a89a8ac8b4dfd Mon Sep 17 00:00:00 2001 From: imoseyon Date: Sat, 13 Dec 2014 16:39:49 -0800 Subject: random32: use e/frandom for reseeding, and a merge fixup --- lib/random32.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'lib/random32.c') diff --git a/lib/random32.c b/lib/random32.c index 0bee183fa..d7a628a61 100644 --- a/lib/random32.c +++ b/lib/random32.c @@ -151,8 +151,7 @@ static u32 __extract_hwseed(void) { unsigned int val = 0; - (void)(arch_get_random_seed_int(&val) || - arch_get_random_int(&val)); + (void)(arch_get_random_int(&val)); return val; } @@ -271,7 +270,7 @@ static void __prandom_reseed(bool late) struct rnd_state *state = &per_cpu(net_rand_state,i); u32 seeds[4]; - get_random_bytes(&seeds, sizeof(seeds)); + erandom_get_random_bytes((char *)&seeds, sizeof(seeds)); state->s1 = __seed(seeds[0], 2U); state->s2 = __seed(seeds[1], 8U); state->s3 = __seed(seeds[2], 16U); -- cgit v1.2.3