[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180530140021.GF3320@localhost.localdomain>
Date: Wed, 30 May 2018 16:00:21 +0200
From: Juri Lelli <juri.lelli@...hat.com>
To: Waiman Long <longman@...hat.com>
Cc: Tejun Heo <tj@...nel.org>, Li Zefan <lizefan@...wei.com>,
Johannes Weiner <hannes@...xchg.org>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>, cgroups@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-doc@...r.kernel.org,
kernel-team@...com, pjt@...gle.com, luto@...capital.net,
Mike Galbraith <efault@....de>, torvalds@...ux-foundation.org,
Roman Gushchin <guro@...com>,
Patrick Bellasi <patrick.bellasi@....com>
Subject: Re: [PATCH] cpuset: Enforce that a child's cpus must be a subset of
the parent
Hi,
On 30/05/18 09:46, Waiman Long wrote:
> It was found that the cpuset.cpus could contain CPUs that are not listed
> in their parent's cpu list as shown by the command sequence below:
>
> # echo "+cpuset" >cgroup.subtree_control
> # mkdir g1
> # echo 0-5 >g1/cpuset.cpus
> # mkdir g1/g11
> # echo "+cpuset" > g1/cgroup.subtree_control
> # echo 6-11 >g1/g11/cpuset.cpus
> # grep -R . g1 | grep "\.cpus"
> g1/cpuset.cpus:0-5
> g1/cpuset.cpus.effective:0-5
> g1/g11/cpuset.cpus:6-11
> g1/g11/cpuset.cpus.effective:0-5
>
> As the intersection of g11's cpus and that of g1 is empty, the effective
> cpus of g11 is just that of g1. The check in update_cpumask() is now
> corrected to make sure that cpus in a child cpus must be a subset of
> its parent's cpus. The error "write error: Invalid argument" will now
> be reported in the above case.
>
> Reported-by: Juri Lelli <juri.lelli@...hat.com>
> Signed-off-by: Waiman Long <longman@...hat.com>
Looks like it fixes the bug.
Reviewed-and-Tested-by: Juri Lelli <juri.lelli@...hat.com>
Thanks,
- Juri
Powered by blists - more mailing lists