Re: [PATCH v3 05/15] cpu/hotplug: convert thread iterator to for_each_thread_rculock
From: sashiko-bot@kernel.org
Date: 2026-09-11 08:11:20
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Medium] The commit message incorrectly claims to replace `for_each_thread()` with `for_each_thread_rculock()`, but the code actually replaces `for_each_process()` with `for_each_process_rculock()`. -- commit 3ac98de6fbc4e97ba4981ef0c4941692c15a9309 Author: Ye Liu [off-list ref] cpu/hotplug: convert thread iterator to for_each_thread_rculock This commit replaces a manual rcu_read_lock() and rcu_read_unlock() pair in clear_tasks_mm_cpumask() with a scoped RCU lock iterator macro.
cpu/hotplug: convert thread iterator to for_each_thread_rculock
Replace the manual rcu_read_lock()/rcu_read_unlock() pair combined
with for_each_thread() loop in kernel/cpu.c with for_each_thread_rculock(),[Severity: Medium] Is the commit message accurate regarding the iterator being replaced? The commit message subject and body describe converting a thread iterator using for_each_thread() to for_each_thread_rculock(). However, looking at clear_tasks_mm_cpumask() in the diff:
quoted hunk ↗ jump to hunk
diff --git a/kernel/cpu.c b/kernel/cpu.c index b3c8553d7bd6c..00638d2abc0f6 100644 --- a/kernel/cpu.c +++ b/kernel/cpu.c@@ -1254,8 +1254,7 @@ void clear_tasks_mm_cpumask(int cpu) * full-fledged tasklist_lock. */ WARN_ON(cpu_online(cpu)); - rcu_read_lock(); - for_each_process(p) { + for_each_process_rculock(p) {
The code actually replaces for_each_process() with for_each_process_rculock(). Could the commit message be updated to match the process iterator actually used in the patch to avoid confusion during review or bisection? -- Sashiko AI review · https://sashiko.dev/#/patchset/20260911075800.491472-1-ye.liu@linux.dev?part=5