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=1796221307; b=m5UA2eA8pxfIk3fMTuwY+4QPN9NaIHrrGaEhLxr+VPRJeJfOUDrO1zZqp2MNeVf8k/Ye /eC1xEHP3lsaOOx5ynTSKTINS0qCf9xSCr2IGjDQQMEYWawfwuw7nXi96RRdQ0dYsUr4k UExYdZLxJndORaqVw7Px/js3f+rxcxqPPcgrL+/6KdEhyjogZQU3piXWJbMaYODEf/u1f Ad/hDJ799xwoNQNjOWIlvQPfGv8tdbpGzRF6mMDuPhnZStcwhClOBSG6hdd7MM2+uRglz oWIojWRKLZui18fHMRstziE+1gkm6BDIkXoFJzk39ZeuV9kD2+OfWn8WzYVlbdd49PQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796221307; h=Received:DKIM-Signature:Subject:To:Cc:From:Date:Message-ID: MIME-Version:Content-Type:Content-Transfer-Encoding; bh=zoRhsuKU5CcNWTRurw8hQkhdQLxe51BJXv9BbE/KiwU=; b=ZVm8/Zq5S6zNNVhg6wKdPYPq1xlldzC7DrWsk29356qyR/kiUhbRDKZEWiCmvcPoNlJN eMNIkeN5boM9TRrSeVu4a0PpoTWcIRvpceij+VRflB/c96NVMF1q2VyDvq6pKl06pVduT mpVg3SMuRNvcSLGR5tPgZeB2Ebo1PR1KxI4vxDng1HkDTdC2IDIo2c40polSszOp3kao5 GQZGplhfFJhiPwI57YpMNkaN6xu+Z9vFyYBJKqTyCjx/6vsktpkCGW20Pl+6wuW+uSedA mlLT5aQzRuk9k0ZN0iaCDG3Dqh2KQeneKgkenLxfOt+Rcwy7hdNG1ueJKZReir6jJng== 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=gGfsjdS9; 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 02311606A31A for ; Wed, 2 Dec 2026 14:21:47 +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=gGfsjdS9 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 538C01F000C1; Wed, 2 Dec 2026 14:21:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796221306; bh=zoRhsuKU5CcNWTRurw8hQkhdQLxe51BJXv9BbE/KiwU=; h=Subject:To:Cc:From:Date; b=gGfsjdS9j908lBM5YHDLaoF6RH4JXvIhxm6aQQ3FGnAdQPQG1E1+X9B2DVO0MKSAh f6+1shyuzGg8HIMZdNcMdwWDFiLGsPXZRC6V6XKR/QqmKLBo28t9gBGKfqGN/6btwo 1Qyn9BMb9yaQhYYDbCqazjRDYgDhMN6494h31TZ8= Subject: FAILED: patch "[PATCH] rcu/nocb: Avoid unsequenced accesses to jiffies in" failed to apply to 6.6-stable tree To: nathan@kernel.org,jfern@kernel.org Cc: From: Date: Wed, 02 Dec 2026 14:38:27 +0100 Message-ID: <2026120227-exit-regain-c236@gregkh> X-Mailing-List: stable@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit The patch below does not apply to the 6.6-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . To reproduce the conflict and resubmit, you may use the following commands: git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.6.y git checkout FETCH_HEAD git cherry-pick -x c3f98ff6309a29979e1867bc3c9d4172755ca122 # git commit -s git send-email --to '' --in-reply-to '2026120227-exit-regain-c236@gregkh' --subject-prefix 'PATCH 6.6.y' 'HEAD^..' Possible dependencies: thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From c3f98ff6309a29979e1867bc3c9d4172755ca122 Mon Sep 17 00:00:00 2001 From: Nathan Chancellor Date: Sat, 14 Nov 2026 21:26:10 -0700 Subject: [PATCH] rcu/nocb: Avoid unsequenced accesses to jiffies in show_rcu_nocb_state() After a recent improvement in clang to warn on unsequenced accesses to volatile variables [1], an instance appears in show_rcu_nocb_state(), which can break the build with CONFIG_WERROR=y / W=e: In file included from kernel/rcu/tree.c:5123: kernel/rcu/tree_nocb.h:1651:3: error: unsequenced accesses to volatile qualified 'jiffies' [-Werror,-Wunsequenced] 1650 | jiffies - rdp->nocb_bypass_first, | ~~~~~~~ 1651 | jiffies - rdp->nocb_nobypass_last, | ^ Per C11 5.1.2.3.2, accessing a volatile object is a side effect. Per C11 6.5.2, unsequenced side effects on the same scalar object are undefined behavior. Per C11 6.5.2.2.10/12, the evaluation of arguments in a function call is indeterminately sequenced, meaning any side effects in the arguments are unsequenced. Add a local variable to hold the value of jiffies before the function call so that there are no unsequenced side effects, clearing up the warning. Cc: stable@vger.kernel.org Fixes: f7a81b12d6af ("rcu/nocb: Print no-CBs diagnostics when rcutorture writer unduly delayed") Closes: https://github.com/ClangBuiltLinux/linux/issues/2192 Link: https://github.com/llvm/llvm-project/commit/955715460eaf9188c241c74750637fc82dfcc423 [1] Signed-off-by: Nathan Chancellor Reviewed-by: Joel Fernandes Signed-off-by: Joel Fernandes diff --git a/kernel/rcu/tree_nocb.h b/kernel/rcu/tree_nocb.h index b6cfee4e5039..8448a7c578e8 100644 --- a/kernel/rcu/tree_nocb.h +++ b/kernel/rcu/tree_nocb.h @@ -1618,6 +1618,7 @@ static void show_rcu_nocb_state(struct rcu_data *rdp) struct rcu_segcblist *rsclp = &rdp->cblist; bool waslocked; bool wassleep; + unsigned long j; if (rdp->nocb_gp_rdp == rdp) show_rcu_nocb_gp_state(rdp); @@ -1639,6 +1640,7 @@ static void show_rcu_nocb_state(struct rcu_data *rdp) rsclp->gp_seq[RCU_NEXT_READY_TAIL].exp); sprintf(bufn, "%ld", rsclp->seglen[RCU_NEXT_TAIL]); sprintf(bufb, "%ld", rcu_cblist_n_cbs(&rdp->nocb_bypass)); + j = jiffies; pr_info(" CB %d^%d->%d %c%c%c%c%c F%ld L%ld C%d %c%s%c%s%c%s%c%s%c%s q%ld %c CPU %d%s\n", rdp->cpu, rdp->nocb_gp_rdp->cpu, nocb_next_rdp ? nocb_next_rdp->cpu : -1, @@ -1647,8 +1649,8 @@ static void show_rcu_nocb_state(struct rcu_data *rdp) "lL"[raw_spin_is_locked(&rdp->nocb_lock)], "sS"[!!rdp->nocb_cb_sleep], ".W"[swait_active(&rdp->nocb_cb_wq)], - jiffies - rdp->nocb_bypass_first, - jiffies - rdp->nocb_nobypass_last, + j - rdp->nocb_bypass_first, + j - rdp->nocb_nobypass_last, rdp->nocb_nobypass_count, ".D"[rcu_segcblist_ready_cbs(rsclp)], rcu_segcblist_segempty(rsclp, RCU_DONE_TAIL) ? "" : bufd,