Re: [PATCH net-next 2/3] bpf: introduce BPF_MAP_TYPE_STACK_TRACE

From
Peter Zijlstra <peterz@infradead.org>
Date
2016-02-25 16:50:19
Also in
lkml
Reply to
Alexei Starovoitov, 2016-02-25
On Thu, Feb 25, 2016 at 08:42:40AM -0800, Alexei Starovoitov wrote:
On 2/25/16 6:23 AM, Peter Zijlstra wrote:
quoted
quoted
+	id = hash & (smap->n_buckets - 1);
Its not at all clear where the corresponding rcu_read_lock() is at.
quoted
quoted
+	bucket = rcu_dereference(smap->buckets[id]);
bpf programs of all types are always executing under rcu_read_lock().
This is fundamental for maps and majority of the helpers
that's why there is no WARN_ON(rcu_read_lock_held) in this helper,
since we already have it in many other places.
The rcu_read_lock() for kprobe type is in trace_call_bpf().
OK, just not clear from reading this patch in isolation I suppose.
Thread (16 messages) 16 messages, 3 authors, last reply 2016-02-25
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help