public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Waiman Long <longman@redhat.com>
Cc: Zefan Li <lizefan.x@bytedance.com>,
	Johannes Weiner <hannes@cmpxchg.org>,
	Shuah Khan <shuah@kernel.org>,
	cgroups@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-kselftest@vger.kernel.org,
	Srinivas Pandruvada <srinivas.pandruvada@intel.com>
Subject: Re: [PATCH] cgroup/cpuset: Fix wrong check in update_parent_subparts_cpumask()
Date: Tue, 31 Jan 2023 12:21:35 -1000	[thread overview]
Message-ID: <Y9mUb22hOY9CmEIt@slm.duckdns.org> (raw)
In-Reply-To: <20230131154803.192530-1-longman@redhat.com>

On Tue, Jan 31, 2023 at 10:48:03AM -0500, Waiman Long wrote:
> It was found that the check to see if a partition could use up all
> the cpus from the parent cpuset in update_parent_subparts_cpumask()
> was incorrect. As a result, it is possible to leave parent with no
> effective cpu left even if there are tasks in the parent cpuset. This
> can lead to system panic as reported in [1].
> 
> Fix this probem by updating the check to fail the enabling the partition
> if parent's effective_cpus is a subset of the child's cpus_allowed.
> 
> Also record the error code when an error happens in update_prstate()
> and add a test case where parent partition and child have the same cpu
> list and parent has task. Enabling partition in the child will fail in
> this case.
> 
> [1] https://www.spinics.net/lists/cgroups/msg36254.html
> 
> Fixes: f0af1bfc27b5 ("cgroup/cpuset: Relax constraints to partition & cpus changes")
> Reported-by: Srinivas Pandruvada <srinivas.pandruvada@intel.com>
> Signed-off-by: Waiman Long <longman@redhat.com>

Applied to cgroup/for-6.2-fixes w/ stable cc added.

Thanks.

-- 
tejun

      reply	other threads:[~2023-01-31 22:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-31 15:48 [PATCH] cgroup/cpuset: Fix wrong check in update_parent_subparts_cpumask() Waiman Long
2023-01-31 22:21 ` Tejun Heo [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Y9mUb22hOY9CmEIt@slm.duckdns.org \
    --to=tj@kernel.org \
    --cc=cgroups@vger.kernel.org \
    --cc=hannes@cmpxchg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=lizefan.x@bytedance.com \
    --cc=longman@redhat.com \
    --cc=shuah@kernel.org \
    --cc=srinivas.pandruvada@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox