Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1491996 > unrolled thread
| Started by | Shaohua Li <shli@fb.com> |
|---|---|
| First post | 2016-09-27 17:50 +0200 |
| Last post | 2016-09-28 04:20 +0200 |
| Articles | 7 — 4 participants |
Back to article view | Back to linux.kernel
[PATCH trival -resend 1/2] bpf: clean up put_cpu_var usage Shaohua Li <shli@fb.com> - 2016-09-27 17:50 +0200
[PATCH trival -resend 2/2] lib: clean up put_cpu_var usage Shaohua Li <shli@fb.com> - 2016-09-27 17:50 +0200
Re: [PATCH trival -resend 2/2] lib: clean up put_cpu_var usage Tejun Heo <tj@kernel.org> - 2016-09-28 01:20 +0200
Re: [PATCH trival -resend 2/2] lib: clean up put_cpu_var usage David Miller <davem@davemloft.net> - 2016-09-28 04:20 +0200
Re: [PATCH trival -resend 1/2] bpf: clean up put_cpu_var usage Alexei Starovoitov <alexei.starovoitov@gmail.com> - 2016-09-28 01:10 +0200
Re: [PATCH trival -resend 1/2] bpf: clean up put_cpu_var usage Tejun Heo <tj@kernel.org> - 2016-09-28 01:20 +0200
Re: [PATCH trival -resend 1/2] bpf: clean up put_cpu_var usage David Miller <davem@davemloft.net> - 2016-09-28 04:20 +0200
| From | Shaohua Li <shli@fb.com> |
|---|---|
| Date | 2016-09-27 17:50 +0200 |
| Subject | [PATCH trival -resend 1/2] bpf: clean up put_cpu_var usage |
| Message-ID | <sm2NP-2OB-21@gated-at.bofh.it> |
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> --- kernel/bpf/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.9.3
[toc] | [next] | [standalone]
| From | Shaohua Li <shli@fb.com> |
|---|---|
| Date | 2016-09-27 17:50 +0200 |
| Subject | [PATCH trival -resend 2/2] lib: clean up put_cpu_var usage |
| Message-ID | <sm2NP-2OB-19@gated-at.bofh.it> |
| In reply to | #1491996 |
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> --- lib/random32.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/random32.c b/lib/random32.c index a309235..fa594b1 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); -- 2.9.3
[toc] | [prev] | [next] | [standalone]
| From | Tejun Heo <tj@kernel.org> |
|---|---|
| Date | 2016-09-28 01:20 +0200 |
| Subject | Re: [PATCH trival -resend 2/2] lib: clean up put_cpu_var usage |
| Message-ID | <sm9Pj-7oH-9@gated-at.bofh.it> |
| In reply to | #1491997 |
On Tue, Sep 27, 2016 at 08:42:42AM -0700, Shaohua Li wrote: > 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> Thanks. -- tejun
[toc] | [prev] | [next] | [standalone]
| From | David Miller <davem@davemloft.net> |
|---|---|
| Date | 2016-09-28 04:20 +0200 |
| Subject | Re: [PATCH trival -resend 2/2] lib: clean up put_cpu_var usage |
| Message-ID | <smcDv-M0-5@gated-at.bofh.it> |
| In reply to | #1491997 |
From: Shaohua Li <shli@fb.com> Date: Tue, 27 Sep 2016 08:42:42 -0700 > 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> Applied.
[toc] | [prev] | [next] | [standalone]
| From | Alexei Starovoitov <alexei.starovoitov@gmail.com> |
|---|---|
| Date | 2016-09-28 01:10 +0200 |
| Message-ID | <sm9FD-7lr-5@gated-at.bofh.it> |
| In reply to | #1491996 |
On Tue, Sep 27, 2016 at 08:42:41AM -0700, Shaohua Li wrote: > 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>
[toc] | [prev] | [next] | [standalone]
| From | Tejun Heo <tj@kernel.org> |
|---|---|
| Date | 2016-09-28 01:20 +0200 |
| Message-ID | <sm9Pj-7oH-7@gated-at.bofh.it> |
| In reply to | #1491996 |
On Tue, Sep 27, 2016 at 08:42:41AM -0700, Shaohua Li wrote: > 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: Tejun Heo <tj@kernel.org> Thanks. -- tejun
[toc] | [prev] | [next] | [standalone]
| From | David Miller <davem@davemloft.net> |
|---|---|
| Date | 2016-09-28 04:20 +0200 |
| Message-ID | <smcDv-M0-7@gated-at.bofh.it> |
| In reply to | #1491996 |
From: Shaohua Li <shli@fb.com> Date: Tue, 27 Sep 2016 08:42:41 -0700 > 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> Applied.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web