selftests: cgroup: Test open-time credential 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 18:59:27 +0000 (20:59 +0200)
commit47802775bc119658e59199d859ba31d62dc5e826
tree825b31c91fbedb4440e6c8a6382f09e4e19057f6
parente326f218de1fcc0b59a5839671b5fe6d386c4583
selftests: cgroup: Test open-time credential usage for migration checks

commit 613e040e4dc285367bff0f8f75ea59839bc10947 upstream.

When a task is writing to an fd opened by a different task, the perm check
should use the credentials 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