selftests: cgroup: Test open-time cgroup namespace usage for migration checks
authorTejun Heo <tj@kernel.org>
Thu, 6 Jan 2022 21:02:29 +0000 (11:02 -1000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 13 Apr 2022 19:01:10 +0000 (21:01 +0200)
commit919823bd6738a5f4388df033a9d6795c82b97cf7
treebbe3e096919c5f4774c7c132f38791e20a8334bf
parent637eca44b8f72c5eae6539fa037548c5fe7193a3
selftests: cgroup: Test open-time cgroup namespace usage for migration checks

commit bf35a7879f1dfb0d050fe779168bcf25c7de66f5 upstream.

When a task is writing to an fd opened by a different task, the perm check
should use the cgroup namespace of the latter task. Add a test for it.

Tested-by: Michal Koutný <mkoutny@suse.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
tools/testing/selftests/cgroup/test_core.c