From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.17]) (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 F13AA1C84BB for ; Wed, 13 May 2026 20:33:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.17 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778704425; cv=none; b=R2svB5wIM888zLWp05qrO8PLxcGhve11o/utv44aFztYvmftvh0yd10k54qGXPSl7Kse3Z/zgkr/1dFkiVpP5jRs7FaK+KSma1uSytD64imEmFGMc6yG65Y54vYHmiaLNndvLEVI4OHIrMZc2V5Wl+Y/mQ+/CfulOKY81CDzjB0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778704425; c=relaxed/simple; bh=QpfAZD5+RHmNHPnMXUPpxcOBAUzJXhzR1ngj1b6Stms=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=SLfiMX4mSqjnY+kIQ1isiUVDkkUSGUcTGA6ruOKrJP3tBF3xzKUB0KMbWmuGYN9AQ40wrz85WQipm8ybpXwoAN44DRrqOgbU1Y0CY03ooVi2CZjNsQgQjSJ6iXyE/xdoW0gXAfjXIshjlEeNe90Fm2E43Uhrp6wYlSw7nPJ/FNo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=pass smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=Qm7e2MxG; arc=none smtp.client-ip=198.175.65.17 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="Qm7e2MxG" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1778704420; x=1810240420; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=QpfAZD5+RHmNHPnMXUPpxcOBAUzJXhzR1ngj1b6Stms=; b=Qm7e2MxGlEV2VUJw7tBbmUeyHlHNdFXEyjH3t9q1MMh4UcGolmVqGBvJ pmB1fPzkidyDBJOxlPvgWo/nlLlQzFUpU6HCF66fmvn6+S6kS27oADkwg CsHj4IOBKYELpwTi1EOOJSQr/83/0XbWRdhLRHw1F8KvF8M2JBo/p+yYf szTqLvlpGhImBIyrNuAFL7qr2kC7gP3Jx3EPTUP77RTYxp6/fVbgL4fGN V05IN3JdYQwMaAI1fGlE6KP+WE0mDD7V//Em3uhnfEUan9C4zs2M41FEP UUtD7ozLhJuyKK4vkzbBSMR6H0LabHbdr3iJlPcGu+p9KVZu9Rs7K9Icn w==; X-CSE-ConnectionGUID: fIRuwq/aTaKgkAQmE+4Ntg== X-CSE-MsgGUID: 0O0sWxMqRhGWBPJKfVaWaw== X-IronPort-AV: E=McAfee;i="6800,10657,11785"; a="79623104" X-IronPort-AV: E=Sophos;i="6.23,233,1770624000"; d="scan'208";a="79623104" Received: from orviesa008.jf.intel.com ([10.64.159.148]) by orvoesa109.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 May 2026 13:33:40 -0700 X-CSE-ConnectionGUID: BHD3mRTgSFuyz3N4yveAJA== X-CSE-MsgGUID: e708Cl5vSlmRux+CgJue2g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.23,233,1770624000"; d="scan'208";a="238076359" Received: from b04f130c83f2.jf.intel.com ([10.165.154.98]) by orviesa008.jf.intel.com with ESMTP; 13 May 2026 13:33:39 -0700 From: Tim Chen To: Peter Zijlstra , Ingo Molnar , K Prateek Nayak , Vincent Guittot Cc: Chen Yu , Juri Lelli , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Valentin Schneider , Madadi Vineeth Reddy , Hillf Danton , Shrikanth Hegde , Jianyong Wu , Yangyu Chen , Tingyin Duan , Vern Hao , Vern Hao , Len Brown , Tim Chen , Aubrey Li , Zhao Liu , Chen Yu , Adam Li , Aaron Lu , Tim Chen , Josh Don , Gavin Guo , Qais Yousef , Libo Chen , Luo Gengkun , linux-kernel@vger.kernel.org Subject: [Patch v4 07/16] sched/cache: Fix rcu warning when accessing sd_llc domain Date: Wed, 13 May 2026 13:39:18 -0700 Message-Id: <2dc49455e861215d8059a1c877953f0b95990038.1778703694.git.tim.c.chen@linux.intel.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Chen Yu rcu_dereference_all() should be used to access the sd_llc domain under RCU protection. This bug was reported by sashiko. Fixes: df0d98475954 ("sched/cache: Introduce infrastructure for cache-aware load balancing") Signed-off-by: Chen Yu Co-developed-by: Tim Chen Signed-off-by: Tim Chen --- kernel/sched/fair.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 01ce646792ff..be96d80c9310 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -1814,7 +1814,7 @@ static void task_cache_work(struct callback_head *work) for_each_cpu(cpu, cpus) { /* XXX sched_cluster_active */ - struct sched_domain *sd = per_cpu(sd_llc, cpu); + struct sched_domain *sd = rcu_dereference_all(per_cpu(sd_llc, cpu)); unsigned long occ, m_occ = 0, a_occ = 0; int m_cpu = -1, i; -- 2.32.0