From nobody Mon Apr 6 19:59:14 2026 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (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 BB4FE37C0FE; Wed, 18 Mar 2026 08:08:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773821322; cv=none; b=HM/fnF1rHBY28Mno/pmgWDIBjNx26HQTzl3eC416GhobO+mIG7CyQ4cOYMWZH272ewqbgYTiLaZoY2FZIaW+hqhFkH/UVp9Wx+8TxhhtVaYlCzS9oIUIsPQyc9jU0VGKtGnWItwcQzOj2hOxoeHcp+KFnF/0Z08uZ3WHXHrcvyQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773821322; c=relaxed/simple; bh=tmHRRP0GUPNgZP8UMd03Yo3deby3Iwqne83f8+tQKKo=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=rxGvtSF+nNSHc+kZSJ4WeDNpFDc4ALQEwYxuIPJxAYBaimOQeePd4XEUboT6LWFVazu57KXixVbaBZ9XN5IsZbJka94Elcfx/r8kNPFZOsIP08rceWSbPyEmAraoGEAhkKotUWB4jhlcMdhjGUiOGSfBhKlyLrHTT0/HkNdvjbk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=srlNNksO; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=dbpKy8ir; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="srlNNksO"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="dbpKy8ir" Date: Wed, 18 Mar 2026 08:08:38 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1773821319; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=hNBA66D+xvKeHm4+WbTzM2p6vLlOLUl05Oyh88NYLFg=; b=srlNNksOkTFVHdsV1W7Mjgh+hP+DoNEbXlH9orVo/LwsTV01bv95y0knI+6hJhm5dxQjHk pLt4O2Wsnb2pRsY4IB3f7VQUhCuQoa5aVc9ucSGJRRFd3z5j1tDsA+GFvaHHiWyXFm1DRS 0x/neJF5/rB0P/Ccnj6rEbdTZifqaVHUTlXV9HZig0jFuajX34YSLUwGFhXFHrbUHSbdwn HbrdEYOb17YIopv8gHnUnlgykxzQU3V6cFFihlwCA+GaZqxyegvdRFJ9l8nX7svPv8J94w 9ndJ4849IlAyCbPDH6snZsXMFUP9tZ97hZxr/Xc4kyYhGkdJdi++Yx2iIEcq9A== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1773821319; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=hNBA66D+xvKeHm4+WbTzM2p6vLlOLUl05Oyh88NYLFg=; b=dbpKy8irWYinRT4ifr68+9FnYkLMYvPnMb4IlCLeddlYgqD8P04feHnTcpCdL4FSYN+yA6 TOiaAuUJL+lhU0AA== From: "tip-bot2 for K Prateek Nayak" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: sched/core] sched/core: Check for rcu_read_lock_any_held() in idle_get_state() Cc: K Prateek Nayak , "Peter Zijlstra (Intel)" , Dietmar Eggemann , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20260312044434.1974-7-kprateek.nayak@amd.com> References: <20260312044434.1974-7-kprateek.nayak@amd.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <177382131816.1647592.10274349631851907613.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable The following commit has been merged into the sched/core branch of tip: Commit-ID: f494bfb04615119f31dbd3222c9d39fea3817d40 Gitweb: https://git.kernel.org/tip/f494bfb04615119f31dbd3222c9d39fea= 3817d40 Author: K Prateek Nayak AuthorDate: Thu, 12 Mar 2026 04:44:31=20 Committer: Peter Zijlstra CommitterDate: Wed, 18 Mar 2026 09:06:49 +01:00 sched/core: Check for rcu_read_lock_any_held() in idle_get_state() Similar to commit 71fedc41c23b ("sched/fair: Switch to rcu_dereference_all()"), switch to checking for rcu_read_lock_any_held() in idle_get_state() to allow removing superfluous rcu_read_lock() regions in the fair task's wakeup path where the pi_lock is held and IRQs are disabled. Signed-off-by: K Prateek Nayak Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Dietmar Eggemann Tested-by: Dietmar Eggemann Link: https://patch.msgid.link/20260312044434.1974-7-kprateek.nayak@amd.com --- kernel/sched/sched.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h index 953d89d..b863bbd 100644 --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h @@ -2853,7 +2853,7 @@ static inline void idle_set_state(struct rq *rq, =20 static inline struct cpuidle_state *idle_get_state(struct rq *rq) { - WARN_ON_ONCE(!rcu_read_lock_held()); + lockdep_assert(rcu_read_lock_any_held()); =20 return rq->idle_state; }