cgroups: disallow attaching kthreadd or PF_THREAD_BOUND threads
authorMike Galbraith <mgalbraith@suse.de>
Sat, 21 Apr 2012 07:13:46 +0000 (09:13 +0200)
committerTejun Heo <tj@kernel.org>
Mon, 23 Apr 2012 18:03:51 +0000 (11:03 -0700)
commitc4c27fbdda4e8ba87806c415b6d15266b07bce4b
treee532518e0942a2562642744103eb64554c8abbda
parent86f82d561864e902c70282b6f17cf590c0f34691
cgroups: disallow attaching kthreadd or PF_THREAD_BOUND threads

Allowing kthreadd to be moved to a non-root group makes no sense, it being
a global resource, and needlessly leads unsuspecting users toward trouble.

1. An RT workqueue worker thread spawned in a task group with no rt_runtime
allocated is not schedulable.  Simple user error, but harmful to the box.

2. A worker thread which acquires PF_THREAD_BOUND can never leave a cpuset,
rendering the cpuset immortal.

Save the user some unexpected trouble, just say no.

Signed-off-by: Mike Galbraith <mgalbraith@suse.de>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Li Zefan <lizefan@huawei.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
kernel/cgroup.c