summaryrefslogtreecommitdiffstats
path: root/kernel/bpf/core.c
diff options
context:
space:
mode:
authorShaohua Li <shli@fb.com>2016-09-27 08:42:41 -0700
committerDavid S. Miller <davem@davemloft.net>2016-09-27 22:09:17 -0400
commitb761fe226be61eba6ae20a424b288559b8a606b5 (patch)
treecfcdd8e788c3f697295217f5e2c8b9a427a814dd /kernel/bpf/core.c
parente96e0eded1335b9cfac71fcdd989d682eb3f8412 (diff)
downloadop-kernel-dev-b761fe226be61eba6ae20a424b288559b8a606b5.zip
op-kernel-dev-b761fe226be61eba6ae20a424b288559b8a606b5.tar.gz
bpf: 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> Cc: Alexei Starovoitov <ast@kernel.org> Signed-off-by: Shaohua Li <shli@fb.com> Acked-by: Alexei Starovoitov <ast@kernel.org> Acked-by: Tejun Heo <tj@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'kernel/bpf/core.c')
-rw-r--r--kernel/bpf/core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/bpf/core.c b/kernel/bpf/core.c
index 7b7baae..aa6d981 100644
--- a/kernel/bpf/core.c
+++ b/kernel/bpf/core.c
@@ -1031,7 +1031,7 @@ BPF_CALL_0(bpf_user_rnd_u32)
state = &get_cpu_var(bpf_user_rnd_state);
res = prandom_u32_state(state);
- put_cpu_var(state);
+ put_cpu_var(bpf_user_rnd_state);
return res;
}
OpenPOWER on IntegriCloud