On 10/2/17 9:26 PM, David Ahern wrote:
On 10/2/17 9:21 PM, Alexei Starovoitov wrote:

i'm not sure what you're trying to say.
The first loop quoted above is inside cgroup_bpf_put()
which is called when cgroup is destroyed. At this point
we're detaching and prog_put all attached programs.
While there is only one static_branch_inc() in __cgroup_bpf_attach()
that is called every time the prog is attached to a cgroup.
So what's the concern?

just asking if cgroup_bpf_enabled_key is 0 when all programs are removed
-- ie., that the inc's and dec's are equal. Reviewing this patch it was
not clear that they are.

after some debugging turned out there is a typo in attach code
that leaks prog in the case of override.
Strangely kmemleak didn't catch it.
Will respin.

Reply via email to