From: kernel test robot <lkp@intel.com>
To: Ziwei Dai <ziwei.dai@unisoc.com>,
rcu@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
"Paul E . McKenney" <paulmck@kernel.org>,
Frederic Weisbecker <frederic@kernel.org>,
Neeraj Upadhyay <neeraj.upadhyay@kernel.org>,
Joel Fernandes <joelagnelf@nvidia.com>,
Josh Triplett <josh@joshtriplett.org>,
Boqun Feng <boqun.feng@kernel.org>,
Uladzislau Rezki <urezki@gmail.com>,
Steven Rostedt <rostedt@goodmis.org>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>, Will Deacon <will@kernel.org>,
Waiman Long <longman@redhat.com>,
Lai Jiangshan <jiangshanlai@gmail.com>,
Zqiang <qiang.zhang@linux.dev>,
lina.yang@unisoc.com
Subject: Re: [PATCH] rcu: Stop re-initializing ->boost_mtx on every boost cycle
Date: Sat, 5 Dec 2026 17:55:02 +0800 [thread overview]
Message-ID: <20261204223109.UDO9Isj1-lkp@intel.com> (raw)
In-Reply-To: <20261204100830.226336-1-ziwei.dai@unisoc.com>
Hi Ziwei,
kernel test robot noticed the following build warnings:
[auto build test WARNING on tip/locking/core]
[also build test WARNING on linus/master v7.4-rc5 next-20261203]
[cannot apply to rcu/rcu/dev]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Ziwei-Dai/rcu-Stop-re-initializing-boost_mtx-on-every-boost-cycle/20261204-180830
base: tip/locking/core
patch link: https://lore.kernel.org/r/20261204100830.226336-1-ziwei.dai%40unisoc.com
patch subject: [PATCH] rcu: Stop re-initializing ->boost_mtx on every boost cycle
config: um-x86_64_defconfig (https://download.01.org/0day-ci/archive/20261204/20261204223109.UDO9Isj1-lkp@intel.com/config)
compiler: clang version 24.0.0git (https://github.com/llvm/llvm-project 63b30c97f6082ebf34b31bdd81bb50df7672b67b)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261204/20261204223109.UDO9Isj1-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/20261204223109.UDO9Isj1-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> kernel/locking/rtmutex_api.c:329:2: warning: calling function 'rt_mutex_set_owner' requires holding raw_spinlock 'lock->wait_lock' exclusively [-Wthread-safety-analysis]
329 | rt_mutex_set_owner(lock, proxy_owner);
| ^
1 warning generated.
vim +329 kernel/locking/rtmutex_api.c
296
297 /**
298 * rt_mutex_boost_set_owner - make an initialized rt_mutex appear to be held
299 by @proxy_owner
300 * @lock: the rt_mutex, which must have been initialized already
301 * @proxy_owner: the task to set as owner
302 *
303 * No locking. Caller has to do serializing itself.
304 *
305 * Counterpart of rt_mutex_init_proxy_locked() for RCU priority boosting,
306 * which reuses a single, permanently embedded rt_mutex
307 * (rcu_node::boost_mtx) for every boost cycle. This performs exactly the
308 * same owner assignment, but deliberately does *not* re-initialize @lock
309 * and therefore does not rewrite lock->wait_lock.
310 *
311 * Re-initializing ->wait_lock is not possible once the mutex is in use.
312 * The task which was boosted in the previous cycle releases ->boost_mtx
313 * via rt_mutex_futex_unlock(), and it does so without holding the rcu_node
314 * lock. The ->owner = NULL store in that path happens while ->wait_lock
315 * is held, so the fast path of rt_mutex_lock() can already succeed at
316 * that point. Rewriting ->wait_lock from the boost kthread in this
317 * window lands on a spinlock which the other CPU still holds, which
318 * corrupts the lock word (on ARM32 ticket spinlocks the previous holder
319 * then trips "BUG: spinlock already unlocked") or, worse, lets two CPUs
320 * run inside the wait_lock protected section at the same time.
321 *
322 * Callers must initialize @lock once, up front, and use this function for
323 * every subsequent ownership transfer. @lock must be free and have no
324 * waiters queued when this is called.
325 */
326 void __sched rt_mutex_boost_set_owner(struct rt_mutex_base *lock,
327 struct task_struct *proxy_owner)
328 {
> 329 rt_mutex_set_owner(lock, proxy_owner);
330 }
331
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
parent reply other threads:[~2026-12-05 9:56 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <20261204100830.226336-1-ziwei.dai@unisoc.com>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261204223109.UDO9Isj1-lkp@intel.com \
--to=lkp@intel.com \
--cc=boqun.feng@kernel.org \
--cc=frederic@kernel.org \
--cc=jiangshanlai@gmail.com \
--cc=joelagnelf@nvidia.com \
--cc=josh@joshtriplett.org \
--cc=lina.yang@unisoc.com \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=longman@redhat.com \
--cc=mathieu.desnoyers@efficios.com \
--cc=mingo@redhat.com \
--cc=neeraj.upadhyay@kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=paulmck@kernel.org \
--cc=peterz@infradead.org \
--cc=qiang.zhang@linux.dev \
--cc=rcu@vger.kernel.org \
--cc=rostedt@goodmis.org \
--cc=urezki@gmail.com \
--cc=will@kernel.org \
--cc=ziwei.dai@unisoc.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox