Thread (20 messages) 20 messages, 4 authors, 2016-10-06

Re: [PATCH 2/2] cgroup: Add a allow_attach policy for Android

From: John Stultz <hidden>
Date: 2016-10-05 19:18:21
Also in: lkml

On Wed, Oct 5, 2016 at 12:10 PM, Dmitry Torokhov
[off-list ref] wrote:
On Mon, Oct 03, 2016 at 09:41:30PM -0700, John Stultz wrote:
quoted
+#ifdef CONFIG_CGROUP_NICE_ATTACH
+int cgroup_nice_allow_attach(struct cgroup_taskset *tset)
+{
+     const struct cred *cred = current_cred(), *tcred;
+     struct task_struct *task;
+     struct cgroup_subsys_state *css;
+
+     if (capable(CAP_SYS_NICE))
+             return 0;
+
+     cgroup_taskset_for_each(task, css, tset) {
+             tcred = __task_cred(task);
__task_cred() requires RCU lock (courtesy Ricky Z).
Again, hopefully this isn't an issue with the new approach, but for
the short term I'll see if we can get this fixed in the android tree.

Thanks again for your careful review!
-john
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help