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

Commit 43eac670 authored by Rom Lemarchand's avatar Rom Lemarchand
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>
parent 3b6b02fc
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
@@ -8247,6 +8247,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,