aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAmit Pundir <amit.pundir@linaro.org>2016-10-29 13:42:56 +0800
committerAmit Pundir <amit.pundir@linaro.org>2016-10-29 13:54:22 +0800
commitb50d89d5045027f1fc7dc4cc52a3f1aefeeb2533 (patch)
treec8febfb3d78f16a022a09cb327a27020fefa26b3 /include
parentded74dd646d2b6e3a078dedfc87babd8226d3751 (diff)
Revert "cgroup: refactor allow_attach function into common code"
This reverts commit 82935fc6645868f1ab09d35ee76b2261889fafac. Part of Chromium commit series: CHROMIUM: remove Android's cgroup generic permissions checks The implementation is utterly broken, resulting in all processes being allows to move tasks between sets (as long as they have access to the "tasks" attribute), and upstream is heading towards checking only capability anyway, so let's get rid of this code. BUG=b:31790445,chromium:647994 TEST=Boot android container, examine logcat Signed-off-by: Dmitry Torokhov <dtor@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/394967 Reviewed-by: Ricky Zhou <rickyz@chromium.org> Reviewed-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/cgroup.h16
1 files changed, 0 insertions, 16 deletions
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h
index 4245f753f5c3..56e7af910f89 100644
--- a/include/linux/cgroup.h
+++ b/include/linux/cgroup.h
@@ -526,17 +526,6 @@ static inline void pr_cont_cgroup_path(struct cgroup *cgrp)
pr_cont_kernfs_path(cgrp->kn);
}
-/*
- * Default Android check for whether the current process is allowed to move a
- * task across cgroups, either because CAP_SYS_NICE is set or because the uid
- * of the calling process is the same as the moved task or because we are
- * running as root.
- * Returns 0 if this is allowed, or -EACCES otherwise.
- */
-int subsys_cgroup_allow_attach(struct cgroup_subsys_state *css,
- struct cgroup_taskset *tset);
-
-
#else /* !CONFIG_CGROUPS */
struct cgroup_subsys_state;
@@ -561,11 +550,6 @@ static inline void cgroup_free(struct task_struct *p) {}
static inline int cgroup_init_early(void) { return 0; }
static inline int cgroup_init(void) { return 0; }
-static inline int subsys_cgroup_allow_attach(struct cgroup_subsys_state *css,
- struct cgroup_taskset *tset)
-{
- return 0;
-}
#endif /* !CONFIG_CGROUPS */
#endif /* _LINUX_CGROUP_H */