summaryrefslogtreecommitdiff
path: root/include/linux/cgroup-defs.h
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2015-06-18 16:54:28 -0400
committerTejun Heo <tj@kernel.org>2015-06-18 16:54:28 -0400
commitdedf22e9e66ef3fbefd1b8c750d2db11b690ade3 (patch)
treedf98e0293fb57ab616f700cf56681023a57d5435 /include/linux/cgroup-defs.h
parentfb02915f47181e824339d91f8e385fd4bd746d6a (diff)
cgroup: separate out cgroup_procs_write_permission() from __cgroup_procs_write()
Separate out task / process migration permission check from __cgroup_procs_write() into cgroup_procs_write_permission(). * Permission check is moved right above the actual migration and no longer performed while holding rcu_read_lock(). cgroup_procs_write_permission() uses get_task_cred() / put_cred() instead of __task_cred(). Also, !root trying to migrate kthreadd or PF_NO_SETAFFINITY tasks will now fail with -EINVAL rather than -EACCES which should be fine. * The same permission check is now performed even when moving self by specifying 0 as pid. This always succeeds so there's no functional difference. We'll add more permission checks later and the benefits of keeping both cases consistent outweigh the minute overhead of doing perm checks on pid 0 case. Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'include/linux/cgroup-defs.h')
0 files changed, 0 insertions, 0 deletions