[tip:locking/core 5/5] kernel/locking/rtmutex_api.c:93:1: warning: expecting rt_mutex 'lock' to be held at the end of function
From: kernel test robot
Date: Tue May 05 2026 - 12:33:11 EST
tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git locking/core
head: d30a456aa7ce1bab05d9b364eeacad0c9cb10cc2
commit: d30a456aa7ce1bab05d9b364eeacad0c9cb10cc2 [5/5] locking/rtmutex: Annotate API and implementation
config: um-defconfig (https://download.01.org/0day-ci/archive/20260506/202605060005.JYWpZXr2-lkp@xxxxxxxxx/config)
compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project 5bac06718f502014fade905512f1d26d578a18f3)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260506/202605060005.JYWpZXr2-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202605060005.JYWpZXr2-lkp@xxxxxxxxx/
All warnings (new ones prefixed by >>):
>> kernel/locking/rtmutex_api.c:93:1: warning: expecting rt_mutex 'lock' to be held at the end of function [-Wthread-safety-analysis]
93 | }
| ^
kernel/locking/rtmutex_api.c:90:14: note: rt_mutex acquired here
90 | void __sched rt_mutex_lock(struct rt_mutex *lock)
| ^
1 warning generated.
vim +/lock +93 kernel/locking/rtmutex_api.c
531ae4b06a737ed Thomas Gleixner 2021-08-15 84
531ae4b06a737ed Thomas Gleixner 2021-08-15 85 /**
531ae4b06a737ed Thomas Gleixner 2021-08-15 86 * rt_mutex_lock - lock a rt_mutex
531ae4b06a737ed Thomas Gleixner 2021-08-15 87 *
531ae4b06a737ed Thomas Gleixner 2021-08-15 88 * @lock: the rt_mutex to be locked
531ae4b06a737ed Thomas Gleixner 2021-08-15 89 */
531ae4b06a737ed Thomas Gleixner 2021-08-15 90 void __sched rt_mutex_lock(struct rt_mutex *lock)
531ae4b06a737ed Thomas Gleixner 2021-08-15 91 {
a3642021923b26d Sebastian Andrzej Siewior 2021-11-29 92 __rt_mutex_lock_common(lock, TASK_UNINTERRUPTIBLE, NULL, 0);
531ae4b06a737ed Thomas Gleixner 2021-08-15 @93 }
531ae4b06a737ed Thomas Gleixner 2021-08-15 94 EXPORT_SYMBOL_GPL(rt_mutex_lock);
531ae4b06a737ed Thomas Gleixner 2021-08-15 95 #endif
531ae4b06a737ed Thomas Gleixner 2021-08-15 96
:::::: The code at line 93 was first introduced by commit
:::::: 531ae4b06a737ed5539cd75dc6f6b9a28f900bba locking/rtmutex: Split API from implementation
:::::: TO: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
:::::: CC: Ingo Molnar <mingo@xxxxxxxxxx>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki