On Thu, Sep 23, 2021 at 10:09:23PM +0200, Daniel Borkmann wrote: > If cgroup_sk_alloc() is called from interrupt context, then just assign the > root cgroup to skcd->cgroup. Prior to commit 8520e224f547 ("bpf, cgroups: > Fix cgroup v2 fallback on v1/v2 mixed mode") we would just return, and later > on in sock_cgroup_ptr(), we were NULL-testing the cgroup in fast-path. Rather > than re-adding the NULL-test to the fast-path we can just assign it once from > cgroup_sk_alloc() given v1/v2 handling has been simplified. I think you should explain why this is safe - ie. when do we hit the condition and leak the socket to the root cgroup and why is that okay? Thanks. -- tejun