Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 89516a9c authored by Rom Lemarchand's avatar Rom Lemarchand Committed by David Ng
Browse files

cgroup: Fix issues in allow_attach callback



- Return -EINVAL when cgroups support isn't enabled
- Add allow_attach callback in CPU cgroups

Change-Id: Id3360b4a39919524fc4b6fcbd44fa2050009f000
Signed-off-by: default avatarRom Lemarchand <romlem@android.com>
Git-commit: 43eac670
Git-repo: https://android.googlesource.com/kernel/common


Signed-off-by: default avatarDavid Ng <dave@codeaurora.org>
parent 861a4ae9
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -948,7 +948,7 @@ static inline int cgroup_attach_task_all(struct task_struct *from,
static inline int subsys_cgroup_allow_attach(struct cgroup_subsys_state *css,
					     void *tset)
{
	return 0;
	return -EINVAL;
}
#endif /* !CONFIG_CGROUPS */

+1 −0
Original line number Diff line number Diff line
@@ -10092,6 +10092,7 @@ struct cgroup_subsys cpu_cgrp_subsys = {
	.fork		= cpu_cgroup_fork,
	.can_attach	= cpu_cgroup_can_attach,
	.attach		= cpu_cgroup_attach,
	.allow_attach   = subsys_cgroup_allow_attach,
	.exit		= cpu_cgroup_exit,
	.legacy_cftypes	= cpu_files,
	.early_init	= 1,