summaryrefslogtreecommitdiff
path: root/kernel/audit_watch.c
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2013-01-07 08:51:07 -0800
committerTejun Heo <tj@kernel.org>2013-01-07 08:51:07 -0800
commit452477fa68c6d8ef80adebd05194c1c157ad9a53 (patch)
tree28682f4307a4e4bc2180d18ccb71a262700699df /kernel/audit_watch.c
parent8d03394877ecdf87e1d694664c460747b8e05aa1 (diff)
downloadlwn-452477fa68c6d8ef80adebd05194c1c157ad9a53.tar.gz
lwn-452477fa68c6d8ef80adebd05194c1c157ad9a53.zip
cpuset: pin down cpus and mems while a task is being attached
cpuset is scheduled to be decoupled from cgroup_lock which will make configuration updates race with task migration. Any config update will be allowed to happen between ->can_attach() and ->attach(). If such config update removes either all cpus or mems, by the time ->attach() is called, the condition verified by ->can_attach(), that the cpuset is capable of hosting the tasks, is no longer true. This patch adds cpuset->attach_in_progress which is incremented from ->can_attach() and decremented when the attach operation finishes either successfully or not. validate_change() treats cpusets w/ non-zero ->attach_in_progress like cpusets w/ tasks and refuses to remove all cpus or mems from it. This currently doesn't make any functional difference as everything is protected by cgroup_mutex but enables decoupling the locking. Signed-off-by: Tejun Heo <tj@kernel.org> Acked-by: Li Zefan <lizefan@huawei.com>
Diffstat (limited to 'kernel/audit_watch.c')
0 files changed, 0 insertions, 0 deletions