lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20251214024904.121128-1-qiang.zhang@linux.dev>
Date: Sun, 14 Dec 2025 10:49:04 +0800
From: Zqiang <qiang.zhang@...ux.dev>
To: paulmck@...nel.org,
	frederic@...nel.org,
	neeraj.upadhyay@...nel.org,
	joelagnelf@...dia.com
Cc: rcu@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	qiang.zhang@...ux.dev
Subject: [PATCH] rcu-tasks: Remove unnecessary smp_store operations in the cblist_init_generic()

The cblist_init_generic() is executed during the CPU early boot
phase due to commit:30ef09635b9e ("rcu-tasks: Initialize callback
lists at rcu_init() time"), at this time, only one boot CPU is
online. this commit therefore use WRITE_ONCE() to replace the
smp_store_release() to assigning rtp->percpu_enqueue_lim in the
cblist_init_generic().

Signed-off-by: Zqiang <qiang.zhang@...ux.dev>
---
 kernel/rcu/tasks.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/rcu/tasks.h b/kernel/rcu/tasks.h
index 76f952196a29..f763f60d5e50 100644
--- a/kernel/rcu/tasks.h
+++ b/kernel/rcu/tasks.h
@@ -292,7 +292,7 @@ static void cblist_init_generic(struct rcu_tasks *rtp)
 		shift++;
 	WRITE_ONCE(rtp->percpu_enqueue_shift, shift);
 	WRITE_ONCE(rtp->percpu_dequeue_lim, lim);
-	smp_store_release(&rtp->percpu_enqueue_lim, lim);
+	WRITE_ONCE(rtp->percpu_enqueue_lim, lim);
 
 	pr_info("%s: Setting shift to %d and lim to %d rcu_task_cb_adjust=%d rcu_task_cpu_ids=%d.\n",
 			rtp->name, data_race(rtp->percpu_enqueue_shift), data_race(rtp->percpu_enqueue_lim),
-- 
2.48.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ