aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMichal Koutný <mkoutny@suse.com>2022-08-26 18:52:36 +0200
committerTejun Heo <tj@kernel.org>2022-08-26 10:57:10 -1000
commit4534dee941056a4ab9dca4a9e2edff28692800b2 (patch)
tree4b429a6e6fee0956eda3e3a8539ff68b432e3717 /include
parentcgroup: Honor caller's cgroup NS when resolving path (diff)
downloadlinux-dev-4534dee941056a4ab9dca4a9e2edff28692800b2.tar.xz
linux-dev-4534dee941056a4ab9dca4a9e2edff28692800b2.zip
cgroup: cgroup: Honor caller's cgroup NS when resolving cgroup id
Cgroup ids are resolved in the global scope. That may be needed sometime (in future) but currently it violates virtual view provided through cgroup namespaces. There are currently following users of the resolution: - fc_appid_store - bpf_iter_attach_cgroup - mem_cgroup_get_from_ino None of the is a called on behalf of kernel but the resolution is made with proper userspace context, hence the default to current->nsproxy makes sens. (This doesn't rule out cgroup_get_from_id with cgroup NS parameter in the future.) Since cgroup ids are defined on v2 hierarchy only, we simply check existence in the cgroup namespace by looking at ancestry on the default hierarchy. Fixes: 6b658c4863c1 ("scsi: cgroup: Add cgroup_get_from_id()") Signed-off-by: Michal Koutný <mkoutny@suse.com> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions