From nobody Thu Apr 2 20:26:41 2026 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 53C2235CB88 for ; Thu, 12 Feb 2026 16:48:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770914891; cv=none; b=dp8cAF8okjx7Whs6CKCxeAEAy5x/qB87X8Eqrj8xvAp766lBQk/cuweA7Vd4Yb/djjQLs3R4EkJO5jKcM6gBHlkdMALFSdS18V59WhN8SOrXSR4HIVuuByAPAR82GhrGy4kBJFWXacoJKgUR5zNM79c68StGwkww2vkIdnXF2dc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770914891; c=relaxed/simple; bh=sEIIJSYnZpvauvSASLQ3csoM6BerjWwcrHU8Z7IAfiY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Rf/7XHcV7Q3l1sux+ZXaOFqXgGXmwfKDDppE5j8zDCNLGpqGnupNi1d60ajWdThdRBrwrTJeuxFbbqo5XMnbi5LR++RTCwXIuOLHkeEARfmvzrkvA3e7BFFB0pnQnD9K+XMQR8Hu+WZdBxJb0SqsJp14nFvjCGfHiTYbh9wUN78= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=h7NGNN1Q; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="h7NGNN1Q" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1770914889; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=IV4KOsWbu66LHPnMQVrH+zBgc3B06m6KKDZounUUUzI=; b=h7NGNN1QT+qDnWQfpfTLfJLwfBWrFXf4f8MnCi3PxMWXTpKB/lf80e31cTJbpl4TlUcLk9 gn/GmLknOqOmsSIzjYIv3jEaWLe1MjB8ro2lviikQ179oVe3D8FhNyPd7tzs07FmYiX2iG d+LXDyVekGXlJBTCmRPifyrEyb4S7UE= Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-580-wDebt_02OWuFesm9gfJa-Q-1; Thu, 12 Feb 2026 11:48:06 -0500 X-MC-Unique: wDebt_02OWuFesm9gfJa-Q-1 X-Mimecast-MFC-AGG-ID: wDebt_02OWuFesm9gfJa-Q_1770914883 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id EEB8E1800259; Thu, 12 Feb 2026 16:48:02 +0000 (UTC) Received: from llong-thinkpadp16vgen1.westford.csb (unknown [10.22.80.194]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 7FFE11800464; Thu, 12 Feb 2026 16:47:59 +0000 (UTC) From: Waiman Long To: Chen Ridong , Tejun Heo , Johannes Weiner , =?UTF-8?q?Michal=20Koutn=C3=BD?= , Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Steven Rostedt , Ben Segall , Mel Gorman , Valentin Schneider , Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , Shuah Khan Cc: cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, Waiman Long Subject: [PATCH v5 1/6] cgroup/cpuset: Fix incorrect change to effective_xcpus in partition_xcpus_del() Date: Thu, 12 Feb 2026 11:46:35 -0500 Message-ID: <20260212164640.2408295-2-longman@redhat.com> In-Reply-To: <20260212164640.2408295-1-longman@redhat.com> References: <20260212164640.2408295-1-longman@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 Content-Type: text/plain; charset="utf-8" The effective_xcpus of a cpuset can contain offline CPUs. In partition_xcpus_del(), the xcpus parameter is incorrectly used as a temporary cpumask to mask out offline CPUs. As xcpus can be the effective_xcpus of a cpuset, this can result in unexpected changes in that cpumask. Fix this problem by not making any changes to the xcpus parameter. Fixes: 11e5f407b64a ("cgroup/cpuset: Keep track of CPUs in isolated partiti= ons") Signed-off-by: Waiman Long Reviewed-by: Chen Ridong --- kernel/cgroup/cpuset.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c index c43efef7df71..a366ef84f982 100644 --- a/kernel/cgroup/cpuset.c +++ b/kernel/cgroup/cpuset.c @@ -1221,8 +1221,8 @@ static void partition_xcpus_del(int old_prs, struct c= puset *parent, isolated_cpus_update(old_prs, parent->partition_root_state, xcpus); =20 - cpumask_and(xcpus, xcpus, cpu_active_mask); cpumask_or(parent->effective_cpus, parent->effective_cpus, xcpus); + cpumask_and(parent->effective_cpus, parent->effective_cpus, cpu_active_ma= sk); } =20 /* --=20 2.52.0