mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Hui Peng <benquike@gmail.com>, Waiman Long <longman@redhat.com>
Cc: "Ridong Chen" <ridong.chen@linux.dev>,
	"Guopeng Zhang" <guopeng.zhang@linux.dev>,
	"Johannes Weiner" <hannes@cmpxchg.org>,
	"Michal Koutný" <mkoutny@suse.com>,
	"Shuah Khan" <shuah@kernel.org>,
	"Chen Ridong" <chenridong@huawei.com>,
	cgroups@vger.kernel.org, linux-kselftest@vger.kernel.org,
	linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH v4 3/3] cgroup/cpuset: check sibling effective_xcpus in cpus_excl_conflict()
Date: Mon, 28 Sep 2026 07:30:38 -1000	[thread overview]
Message-ID: <990954c20586117100f2a527ebc02820@kernel.org> (raw)
In-Reply-To: <20260924042729.1908863-4-benquike@gmail.com>

Hello, Hui.

The following is a Claude-generated review.

On Thu, Sep 24, 2026 at 04:27:29AM +0000, Hui Peng wrote:
> In cpus_excl_conflict(), when a valid local partition A1 uses implicit
> exclusive CPUs (cpuset.cpus set without cpuset.cpus.exclusive, so
> sibling->exclusive_cpus is empty while sibling->effective_xcpus is
> populated), a sibling cgroup B1 can still set cpuset.cpus.exclusive on
> the same CPUs because cpus_excl_conflict() only checks
> sibling->exclusive_cpus.

update_exclusive_cpumask() runs compute_trialcs_excpus() before
validate_change(), and rm_siblings_excl_cpus() already falls back to the
sibling's effective_xcpus when its exclusive_cpus is empty:

	sibling_xcpus = cpumask_empty(sibling->exclusive_cpus)
		      ? sibling->effective_xcpus
		      : sibling->exclusive_cpus;

	if (cpumask_intersects(excpus, sibling_xcpus)) {
		cpumask_andnot(excpus, excpus, sibling_xcpus);
		retval++;
	}

With A1 a valid partition on 0-3, B1's write of 3-5 hits CPU 3 there and
fails with -EINVAL before cpus_excl_conflict() is reached, so the added
check doesn't change the outcome and the new test row should pass without
the kernel change. Was the write observed to succeed somewhere? That check
also predates 2a3602030d80, so the Fixes tag wouldn't hold either.

Thanks.

--
tejun

      parent reply	other threads:[~2026-09-28 17:30 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-24  4:27 [PATCH v4 0/3] cgroup/cpuset: fix exclusive CPU conflict checks for local and remote partitions Hui Peng
2026-09-24  4:27 ` [PATCH v4 1/3] cgroup/cpuset: return PERR_NOCPUS in remote_partition_enable() on subpartitions_cpus conflict Hui Peng
2026-09-25 19:22   ` Waiman Long
2026-09-26 19:11   ` Tejun Heo
2026-09-28  1:25   ` Ridong Chen
2026-09-24  4:27 ` [PATCH v4 2/3] cgroup/cpuset: prevent activating local partition over remote one Hui Peng
2026-09-27  1:45   ` Waiman Long
2026-09-28  1:40   ` Ridong Chen
2026-09-28 16:13     ` Waiman Long
2026-09-24  4:27 ` [PATCH v4 3/3] cgroup/cpuset: check sibling effective_xcpus in cpus_excl_conflict() Hui Peng
2026-09-27 23:44   ` Waiman Long
2026-09-28 17:30   ` 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=990954c20586117100f2a527ebc02820@kernel.org \
    --to=tj@kernel.org \
    --cc=benquike@gmail.com \
    --cc=cgroups@vger.kernel.org \
    --cc=chenridong@huawei.com \
    --cc=guopeng.zhang@linux.dev \
    --cc=hannes@cmpxchg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=longman@redhat.com \
    --cc=mkoutny@suse.com \
    --cc=ridong.chen@linux.dev \
    --cc=shuah@kernel.org \
    --cc=stable@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®