summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorShaohua Li <shli@fb.com>2016-09-27 08:42:42 -0700
committerDavid S. Miller <davem@davemloft.net>2016-09-27 22:09:17 -0400
commit3796c3cbfb91ad1e3269aa0d15060f888063924b (patch)
treec1c387b898c0c6f8b2e220c242b81b60d758756b /lib
parentb761fe226be61eba6ae20a424b288559b8a606b5 (diff)
downloadlinux-3796c3cbfb91ad1e3269aa0d15060f888063924b.tar.bz2
lib: clean up put_cpu_var usage
put_cpu_var takes the percpu data, not the data returned from get_cpu_var. This doesn't change the behavior. Cc: Tejun Heo <tj@kernel.org> Signed-off-by: Shaohua Li <shli@fb.com> Acked-by: Tejun Heo <tj@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'lib')
-rw-r--r--lib/random32.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/random32.c b/lib/random32.c
index 69ed593aab07..915982b304bb 100644
--- a/lib/random32.c
+++ b/lib/random32.c
@@ -81,7 +81,7 @@ u32 prandom_u32(void)
u32 res;
res = prandom_u32_state(state);
- put_cpu_var(state);
+ put_cpu_var(net_rand_state);
return res;
}
@@ -128,7 +128,7 @@ void prandom_bytes(void *buf, size_t bytes)
struct rnd_state *state = &get_cpu_var(net_rand_state);
prandom_bytes_state(state, buf, bytes);
- put_cpu_var(state);
+ put_cpu_var(net_rand_state);
}
EXPORT_SYMBOL(prandom_bytes);