From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796385033; b=wPNmvDywIjab5UdZDSvWZqoJKAUCUb3/YIpRhKEkZb+Z52pYOF21qDaQkuq0HqOKydr3 CSSvmMc/7Rcjkt+kYekiEKJdTlrUlA7D1kvjRaiFpytN4/2citEsimR8gWPtk9VMg97yA +ZkDtUhXFLcOArFfyAfUm1R4Su1TlnbgnJeBGYzKtqRYV8sg+jn5DWIuiIirU8PsFj6SU svUPSqZO0WJAZz8HOEAc/cxB0MCyj7rxCXsZBYL/JzJ6vX2sVqRkgiC967FI110pI2Lf+ UOIJJZ9kZSwsKsgzMM09skgMhGNMpb7wBm71c4SjsFL2Ex3WDM4ko+Fce4cepYJI6lQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796385033; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:User-Agent:X-stable:X-Patchwork-Hint: MIME-Version:Content-Transfer-Encoding; bh=FpcRWsQaMw4+flTH8LueBDUIrgLkE7NQuiauSG46Lug=; b=x92XTsDiHvL018m/8cxB9B+M3XISfuUZxQjUEfTqV3x9lldsG5Ylv7GcRuN/Y3GwmqFu vXGdRUkPXbRpMecDOjoTgtMc2Q4RXwLd92Wm9BWnyeWwrt2HcEqhhNz+wAcXc9+5Bh34h 6DoEKy4zroeoTQ/QCJOCn4H8pI/OFtWvGFIdJpNE/mN0Ffq+F4ejvDmGeUmxH18FgTiln LODsTn8ZVyu0WOsFJZPDFw16mWsnhKTVsSSLX7xEU4wONTBgJSMPXwjvB/4NEuukghIeh 94sDAbzm4Jx/BCg96N+/cQ3G94pgFcLGl6CfgnH/AFWX5drUGaj+JsW93KP0inu/mEQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=xYK8BGeb; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 14744606A339; Fri, 4 Dec 2026 11:50:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=xYK8BGeb Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2EF5B1F00897; Fri, 4 Dec 2026 11:50:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796385032; bh=FpcRWsQaMw4+flTH8LueBDUIrgLkE7NQuiauSG46Lug=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=xYK8BGebQhNHZfDwGdipgqIZUj9ZxoY8qujbxu0eGNVEdClopDqMQzxfEPdLWfs+u uLdkR+m3K1Q6ttXiVmW3D/kwL+texdddFjKC+0FINmKLbYGTqyJsp59OudaHkeA/Fe 8CP4W9bcm8x7y0CufubL8pKiYX9EWNc9lndOAEMU= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Sashiko , Tony Luck , "Borislav Petkov (AMD)" , Reinette Chatre , Sasha Levin Subject: [PATCH 6.6 0391/1167] fs/resctrl: Ensure default group reports tasks on monitor-only systems Date: Fri, 4 Dec 2026 18:56:58 +0900 Message-ID: <20261204100712.210332136@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100702.047403948@linuxfoundation.org> References: <20261204100702.047403948@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: patches@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Tony Luck [ Upstream commit 2c10b3fa5bdf61e344bc522e6c2e00d870ce7ab8 ] resctrl can be mounted on a system that supports monitoring but not allocation. On such a system reading the "tasks" file in the default group reports no tasks, even when there are tasks assigned to the default group. This problem occurs because the check for whether a task belongs to a CTRL_MON group is gated by a check for whether the system supports allocation. The resctrl_arch_alloc_capable() check in is_closid_match() breaks task reporting for the default group on monitor-only systems so remove this check. On systems that support allocation the check is redundant. Fixes: e6b2fac36fcc ("x86/resctrl: Use is_closid_match() in more places") Closes: https://sashiko.dev/#/patchset/20260831174421.13921-1-tony.luck%40intel.com?part=9 Reported-by: Sashiko Signed-off-by: Tony Luck Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Reinette Chatre Link: https://patch.msgid.link/20261009193923.15498-1-tony.luck@intel.com [ sashal: adapted the change to the old file location, using the rdt_alloc_capable flag context and a direct t->closid == r->closid comparison instead of the newer arch helpers ] Signed-off-by: Sasha Levin --- arch/x86/kernel/cpu/resctrl/rdtgroup.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/x86/kernel/cpu/resctrl/rdtgroup.c b/arch/x86/kernel/cpu/resctrl/rdtgroup.c index 02394f49a7c93..11a11bc99ccec 100644 --- a/arch/x86/kernel/cpu/resctrl/rdtgroup.c +++ b/arch/x86/kernel/cpu/resctrl/rdtgroup.c @@ -606,8 +606,7 @@ static int __rdtgroup_move_task(struct task_struct *tsk, static bool is_closid_match(struct task_struct *t, struct rdtgroup *r) { - return (rdt_alloc_capable && - (r->type == RDTCTRL_GROUP) && (t->closid == r->closid)); + return ((r->type == RDTCTRL_GROUP) && (t->closid == r->closid)); } static bool is_rmid_match(struct task_struct *t, struct rdtgroup *r) -- 2.53.0