From: Alexei Starovoitov
Date: Thu, 28 May 2015 19:26:02 -0700
> Normally the program attachment place (like sockets, qdiscs) takes
> care of rcu protection and calls bpf_prog_put() after a grace period.
> The programs stored inside prog_array may not be attached anywhere,
> so prog_array needs t
On 05/30/2015 01:22 AM, Alexei Starovoitov wrote:
...
Like __sk_filter_release() and __bpf_prog_release() should be removed.
The whole filter cleanup procedure needs to be simplified a bit, got a
bit too complicated over time, agreed.
Of course, it's a grey line when to introduce a helper and
On 5/29/15 2:10 AM, Daniel Borkmann wrote:
+static void __prog_put_rcu(struct rcu_head *rcu)
+{
+struct bpf_prog_aux *aux = container_of(rcu, struct bpf_prog_aux,
rcu);
+
+free_used_maps(aux);
+bpf_prog_free(aux->prog);
Not sure if it's worth it to move these two into a common help
On 05/29/2015 04:26 AM, Alexei Starovoitov wrote:
Normally the program attachment place (like sockets, qdiscs) takes
care of rcu protection and calls bpf_prog_put() after a grace period.
The programs stored inside prog_array may not be attached anywhere,
so prog_array needs to take care of preser
Normally the program attachment place (like sockets, qdiscs) takes
care of rcu protection and calls bpf_prog_put() after a grace period.
The programs stored inside prog_array may not be attached anywhere,
so prog_array needs to take care of preserving rcu protection.
Otherwise bpf_tail_call() will