diff options
| author | Andres Oportus <andresoportus@google.com> | 2017-03-27 16:05:46 +0100 |
|---|---|---|
| committer | Georg Veichtlbauer <georg@vware.at> | 2023-07-26 21:01:08 +0200 |
| commit | f39d0b496aa4e13cbcf23bdf3c22d356bd783b9e (patch) | |
| tree | 7f3b86fd91bba866225217e6f63bdd5a97e907db /kernel | |
| parent | 454f5f5a9d616fa0e9b09f13f385496cdf6a68e9 (diff) | |
sched: tune: Unconditionally allow attach
in commit ac087abe1358 ("Merge android-msm-8998-4.4-common into
android-msm-muskie-4.4"),
.allow_attach = subsys_cgroup_allow_attach,
was dropped in the merge.
This patch brings back allow_attach,
but with the marlin-3.18 behavior of allowing all cgroup changes
rather than the subsys_cgroup_allow_attach behavior of
requiring SYS_CAP_NICE.
Bug: 36592053
Change-Id: Iaa51597b49a955fd5709ca504e968ea19a9ca8f5
Signed-off-by: Andres Oportus <andresoportus@google.com>
Signed-off-by: Andrew Chant <achant@google.com>
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/sched/tune.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/kernel/sched/tune.c b/kernel/sched/tune.c index 99b580d2395a..62d7a0f93cef 100644 --- a/kernel/sched/tune.c +++ b/kernel/sched/tune.c @@ -518,6 +518,13 @@ void schedtune_enqueue_task(struct task_struct *p, int cpu) raw_spin_unlock_irqrestore(&bg->lock, irq_flags); } +int schedtune_allow_attach(struct cgroup_subsys_state *css, + struct cgroup_taskset *tset) +{ + /* We always allows tasks to be moved between existing CGroups */ + return 0; +} + int schedtune_can_attach(struct cgroup_taskset *tset) { struct task_struct *task; @@ -533,7 +540,6 @@ int schedtune_can_attach(struct cgroup_taskset *tset) if (!unlikely(schedtune_initialized)) return 0; - cgroup_taskset_for_each(task, css, tset) { /* @@ -901,6 +907,7 @@ schedtune_css_free(struct cgroup_subsys_state *css) struct cgroup_subsys schedtune_cgrp_subsys = { .css_alloc = schedtune_css_alloc, .css_free = schedtune_css_free, + .allow_attach = schedtune_allow_attach, .can_attach = schedtune_can_attach, .cancel_attach = schedtune_cancel_attach, .legacy_cftypes = files, |
