kernel/locking/rtmutex_api.c:296: warning: Function parameter or struct member 'wake_q' not described in '__rt_mutex_start_proxy_lock'
kernel test robot
build bottree: https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git sched/core head: f3542dc97564eea82e113e7978ed9ea5ccc7f37e commit: 8d8fcb8c6a67c5c2674c25effa5c728b1410232d [4/10] locking/mutex: Remove wakeups from under mutex::wait_lock config: openrisc-allnoconfig (https://download.01.org/0day-ci/archive/20241012/[email protected]/config) compiler: or1k-linux-gcc (GCC) 14.1.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241012/[email protected]/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 <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
All warnings (new ones prefixed by >>):
>> kernel/locking/rtmutex_api.c:296: warning: Function parameter or struct member 'wake_q' not described in '__rt_mutex_start_proxy_lock'
vim +296 kernel/locking/rtmutex_api.c
531ae4b06a737e Thomas Gleixner 2021-08-15 272
531ae4b06a737e Thomas Gleixner 2021-08-15 273 /**
531ae4b06a737e Thomas Gleixner 2021-08-15 274 * __rt_mutex_start_proxy_lock() - Start lock acquisition for another task
531ae4b06a737e Thomas Gleixner 2021-08-15 275 * @lock: the rt_mutex to take
531ae4b06a737e Thomas Gleixner 2021-08-15 276 * @waiter: the pre-initialized rt_mutex_waiter
531ae4b06a737e Thomas Gleixner 2021-08-15 277 * @task: the task to prepare
531ae4b06a737e Thomas Gleixner 2021-08-15 278 *
531ae4b06a737e Thomas Gleixner 2021-08-15 279 * Starts the rt_mutex acquire; it enqueues the @waiter and does deadlock
531ae4b06a737e Thomas Gleixner 2021-08-15 280 * detection. It does not wait, see rt_mutex_wait_proxy_lock() for that.
531ae4b06a737e Thomas Gleixner 2021-08-15 281 *
531ae4b06a737e Thomas Gleixner 2021-08-15 282 * NOTE: does _NOT_ remove the @waiter on failure; must either call
531ae4b06a737e Thomas Gleixner 2021-08-15 283 * rt_mutex_wait_proxy_lock() or rt_mutex_cleanup_proxy_lock() after this.
531ae4b06a737e Thomas Gleixner 2021-08-15 284 *
531ae4b06a737e Thomas Gleixner 2021-08-15 285 * Returns:
531ae4b06a737e Thomas Gleixner 2021-08-15 286 * 0 - task blocked on lock
531ae4b06a737e Thomas Gleixner 2021-08-15 287 * 1 - acquired the lock for task, caller should wake it up
531ae4b06a737e Thomas Gleixner 2021-08-15 288 * <0 - error
531ae4b06a737e Thomas Gleixner 2021-08-15 289 *
531ae4b06a737e Thomas Gleixner 2021-08-15 290 * Special API call for PI-futex support.
531ae4b06a737e Thomas Gleixner 2021-08-15 291 */
830e6acc8a1caf Peter Zijlstra 2021-08-15 292 int __sched __rt_mutex_start_proxy_lock(struct rt_mutex_base *lock,
531ae4b06a737e Thomas Gleixner 2021-08-15 293 struct rt_mutex_waiter *waiter,
8d8fcb8c6a67c5 Peter Zijlstra 2024-10-09 294 struct task_struct *task,
8d8fcb8c6a67c5 Peter Zijlstra 2024-10-09 295 struct wake_q_head *wake_q)
531ae4b06a737e Thomas Gleixner 2021-08-15 @296 {
531ae4b06a737e Thomas Gleixner 2021-08-15 297 int ret;
531ae4b06a737e Thomas Gleixner 2021-08-15 298
531ae4b06a737e Thomas Gleixner 2021-08-15 299 lockdep_assert_held(&lock->wait_lock);
531ae4b06a737e Thomas Gleixner 2021-08-15 300
531ae4b06a737e Thomas Gleixner 2021-08-15 301 if (try_to_take_rt_mutex(lock, task, NULL))
531ae4b06a737e Thomas Gleixner 2021-08-15 302 return 1;
531ae4b06a737e Thomas Gleixner 2021-08-15 303
531ae4b06a737e Thomas Gleixner 2021-08-15 304 /* We enforce deadlock detection for futexes */
add461325ec5bc Peter Zijlstra 2021-08-15 305 ret = task_blocks_on_rt_mutex(lock, waiter, task, NULL,
8d8fcb8c6a67c5 Peter Zijlstra 2024-10-09 306 RT_MUTEX_FULL_CHAINWALK, wake_q);
531ae4b06a737e Thomas Gleixner 2021-08-15 307
531ae4b06a737e Thomas Gleixner 2021-08-15 308 if (ret && !rt_mutex_owner(lock)) {
531ae4b06a737e Thomas Gleixner 2021-08-15 309 /*
531ae4b06a737e Thomas Gleixner 2021-08-15 310 * Reset the return value. We might have
531ae4b06a737e Thomas Gleixner 2021-08-15 311 * returned with -EDEADLK and the owner
531ae4b06a737e Thomas Gleixner 2021-08-15 312 * released the lock while we were walking the
531ae4b06a737e Thomas Gleixner 2021-08-15 313 * pi chain. Let the waiter sort it out.
531ae4b06a737e Thomas Gleixner 2021-08-15 314 */
531ae4b06a737e Thomas Gleixner 2021-08-15 315 ret = 0;
531ae4b06a737e Thomas Gleixner 2021-08-15 316 }
531ae4b06a737e Thomas Gleixner 2021-08-15 317
531ae4b06a737e Thomas Gleixner 2021-08-15 318 return ret;
531ae4b06a737e Thomas Gleixner 2021-08-15 319 }
531ae4b06a737e Thomas Gleixner 2021-08-15 320 :::::: The code at line 296 was first introduced by commit
:::::: 531ae4b06a737ed5539cd75dc6f6b9a28f900bba locking/rtmutex: Split API from implementation
:::::: TO: Thomas Gleixner <[email protected]>
:::::: CC: Ingo Molnar <[email protected]>
Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
PATCH 1/1 locking: Fix warning from missing argument documentation
The kernel test robot complained the commit 8d8fcb8c6a67 ("locking/mutex: Remove wakeups from under mutex::wait_lock"), currently only in Peter's git tree, didn't update the kernel doc for the new wake_q argument added.
So fix this up.
--- kernel/locking/rtmutex.c | 2 ++ kernel/locking/rtmutex_api.c | 1 + 2 files changed, 3 insertions(+)
kernel/locking/rtmutex.c +2 -0
@@ -1680,6 +1680,7 @@ static void __sched rt_mutex_handle_deadlock(int res, int detect_deadlock,* @state: The task state for sleeping * @chwalk: Indicator whether full or partial chainwalk is requested * @waiter: Initializer waiter for blocking +* @wake_q: The wake_q to wake tasks after we release the wait_lock */ static int __sched __rt_mutex_slowlock(struct rt_mutex_base *lock, struct ww_acquire_ctx *ww_ctx,
@@ -1815,6 +1816,7 @@ static __always_inline int __rt_mutex_lock(struct rt_mutex_base *lock,/** * rtlock_slowlock_locked - Slow path lock acquisition for RT locks * @lock: The underlying RT mutex +* @wake_q: The wake_q to wake tasks after we release the wait_lock */ static void __sched rtlock_slowlock_locked(struct rt_mutex_base *lock,struct wake_q_head *wake_q)
kernel/locking/rtmutex_api.c +1 -0
@@ -275,6 +275,7 @@ void __sched rt_mutex_proxy_unlock(struct rt_mutex_base *lock)* @lock: the rt_mutex to take * @waiter: the pre-initialized rt_mutex_waiter * @task: the task to prepare +* @wake_q: the wake_q to wake tasks after we release the wait_lock * * Starts the rt_mutex acquire; it enqueues the @waiter and does deadlock * detection. It does not wait, see rt_mutex_wait_proxy_lock() for that.
Signature · 1 line
2.47.0.rc1.288.g06298d1525-goog
Peter Zijlstra
maintainerRe: [PATCH] locking: Fix warning from missing argument documentation
Quoted 4 lines · John Stultz
The kernel test robot complained the commit
8d8fcb8c6a67("locking/mutex: Remove wakeups from undermutex::wait_lock"), currently only in Peter's git tree, didn't update the kernel doc for the newwake_qargument added.
I have folded this and a fix for the i386-randconfig build problem, and pushed out again.
Re: [PATCH] locking: Fix warning from missing argument documentation
Quoted 9 lines · Peter Zijlstra
Quoted 4 lines · John Stultz
The kernel test robot complained the commit
8d8fcb8c6a67("locking/mutex: Remove wakeups from undermutex::wait_lock"), currently only in Peter's git tree, didn't update the kernel doc for the newwake_qargument added.I have folded this and a fix for the i386-randconfig build problem, and pushed out again.
Thanks so much!
-john