Re: [PATCH bpf/for-next] cgroup: Make current_cgns_cgroup_dfl() safe to call after exit_task_namespace()
From: patchwork-bot+netdevbpf
Date: Tue Mar 14 2023 - 20:00:25 EST
Hello:
This patch was applied to bpf/bpf-next.git (master)
by Alexei Starovoitov <ast@xxxxxxxxxx>:
On Tue, 14 Mar 2023 11:59:49 -1000 you wrote:
> 332ea1f697be ("bpf: Add bpf_cgroup_from_id() kfunc") added
> bpf_cgroup_from_id() which calls current_cgns_cgroup_dfl() through
> cgroup_get_from_id(). However, BPF programs may be attached to a point where
> current->nsproxy has already been cleared to NULL by exit_task_namespace()
> and calling bpf_cgroup_from_id() would cause an oops.
>
> Just return the system-wide root if nsproxy has been cleared. This allows
> all cgroups to be looked up after the task passed through
> exit_task_namespace(), which semantically makes sense. Given that the only
> way to get this behavior is through BPF programs, it seems safe but let's
> see what others think.
>
> [...]
Here is the summary with links:
- [bpf/for-next] cgroup: Make current_cgns_cgroup_dfl() safe to call after exit_task_namespace()
https://git.kernel.org/bpf/bpf-next/c/b8a2e3f93d41
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html