Subject: Re: [PATCH net-next] net_sched: act_bpf: remove spinlock in fast path

From: Alexei Starovoitov <[email-masked]>
Date: Tue, 4 Aug 2015 09:35:21 -0700

On 8/4/15 1:55 AM, Daniel Borkmann wrote:
> Okay, what happens however, when we have an action attached to a
> classifier and do a replace on that action, meaning one CPU is still
> executing the filter inside tcf_bpf(), while another one is already
> running tcf_bpf_cfg_cleanup() on that prog? Afaik, the schedule_work()
> that's called during freeing maps/progs might 'mitigate' this race,
> but doesn't give a hard guarantee, right?

ahh, yes, that's completely different race. tcf_bpf_cfg_cleanup should
be doing call_rcu.
Will respin the patch.