lkml.org 
[lkml]   [2015]   [Mar]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/3] cpuset: initialize effective masks when clone_children is enabled
Hi Tejun,

Could you pick up those bug fixes? Or should I ask Ingo/akpm to take
care of them?

On 2015/2/13 11:19, Zefan Li wrote:
> If clone_children is enabled, effective masks won't be initialized
> due to the bug:
>
> # mount -t cgroup -o cpuset xxx /mnt
> # echo 1 > cgroup.clone_children
> # mkdir /mnt/tmp
> # cat /mnt/tmp/
> # cat cpuset.effective_cpus
>
> # cat cpuset.cpus
> 0-15
>
> And then this cpuset won't constrain the tasks in it.
>
> Either the bug or the fix has no effect on unified hierarchy, as
> there's no clone_chidren flag there any more.
>
> Reported-by: Christian Brauner <christianvanbrauner@gmail.com>
> Reported-by: Serge Hallyn <serge.hallyn@ubuntu.com>
> Cc: <stable@vger.kernel.org> # 3.17+
> Signed-off-by: Zefan Li <lizefan@huawei.com>
> ---
> kernel/cpuset.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/kernel/cpuset.c b/kernel/cpuset.c
> index 64b257f..7e9d711 100644
> --- a/kernel/cpuset.c
> +++ b/kernel/cpuset.c
> @@ -1992,7 +1992,9 @@ static int cpuset_css_online(struct cgroup_subsys_state *css)
>
> spin_lock_irq(&callback_lock);
> cs->mems_allowed = parent->mems_allowed;
> + cs->effective_mems = parent->mems_allowed;
> cpumask_copy(cs->cpus_allowed, parent->cpus_allowed);
> + cpumask_copy(cs->effective_cpus, parent->cpus_allowed);
> spin_unlock_irq(&callback_lock);
> out_unlock:
> mutex_unlock(&cpuset_mutex);
>



\
 
 \ /
  Last update: 2015-03-02 07:41    [W:2.055 / U:1.384 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site