diff options
Diffstat (limited to 'lib/random32.c')
-rw-r--r-- | lib/random32.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/random32.c b/lib/random32.c index 69ed593aab07..fa594b1140e6 100644 --- a/lib/random32.c +++ b/lib/random32.c | |||
@@ -47,7 +47,7 @@ static inline void prandom_state_selftest(void) | |||
47 | } | 47 | } |
48 | #endif | 48 | #endif |
49 | 49 | ||
50 | static DEFINE_PER_CPU(struct rnd_state, net_rand_state); | 50 | static DEFINE_PER_CPU(struct rnd_state, net_rand_state) __latent_entropy; |
51 | 51 | ||
52 | /** | 52 | /** |
53 | * prandom_u32_state - seeded pseudo-random number generator. | 53 | * prandom_u32_state - seeded pseudo-random number generator. |
@@ -81,7 +81,7 @@ u32 prandom_u32(void) | |||
81 | u32 res; | 81 | u32 res; |
82 | 82 | ||
83 | res = prandom_u32_state(state); | 83 | res = prandom_u32_state(state); |
84 | put_cpu_var(state); | 84 | put_cpu_var(net_rand_state); |
85 | 85 | ||
86 | return res; | 86 | return res; |
87 | } | 87 | } |
@@ -128,7 +128,7 @@ void prandom_bytes(void *buf, size_t bytes) | |||
128 | struct rnd_state *state = &get_cpu_var(net_rand_state); | 128 | struct rnd_state *state = &get_cpu_var(net_rand_state); |
129 | 129 | ||
130 | prandom_bytes_state(state, buf, bytes); | 130 | prandom_bytes_state(state, buf, bytes); |
131 | put_cpu_var(state); | 131 | put_cpu_var(net_rand_state); |
132 | } | 132 | } |
133 | EXPORT_SYMBOL(prandom_bytes); | 133 | EXPORT_SYMBOL(prandom_bytes); |
134 | 134 | ||