All of lore.kernel.org
 help / color / mirror / Atom feed
* [axboe:block-7.2 42/44] drivers/block/ublk_drv.c:4433:3-9: preceding lock on line 4431
@ 2026-07-23 16:55 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-07-23 16:55 UTC (permalink / raw)
  To: oe-kbuild; +Cc: lkp, Julia Lawall

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
TO: Ming Lei <tom.leiming@gmail.com>
CC: Jens Axboe <axboe@kernel.dk>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux.git block-7.2
head:   432a9b2780c0a01caf547bd1fc2fcf28aeb8d173
commit: 432a9b2780c0a01caf547bd1fc2fcf28aeb8d173 [42/44] ublk: wait on ublk_dev_ready() instead of ub->completion
:::::: branch date: 4 days ago
:::::: commit date: 4 days ago
config: openrisc-randconfig-r053-20260723 (https://download.01.org/0day-ci/archive/20260724/202607240051.mmC9T4aB-lkp@intel.com/config)
compiler: or1k-linux-gcc (GCC) 16.1.0

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>
| Reported-by: Julia Lawall <julia.lawall@inria.fr>
| Closes: https://lore.kernel.org/r/202607240051.mmC9T4aB-lkp@intel.com/

cocci warnings: (new ones prefixed by >>)
>> drivers/block/ublk_drv.c:4433:3-9: preceding lock on line 4431

vim +4433 drivers/block/ublk_drv.c

47bdf1d29caec72 Seamus Connor 2026-01-14  4417  
432a9b2780c0a01 Ming Lei      2026-07-19  4418  /*
432a9b2780c0a01 Ming Lei      2026-07-19  4419   * Wait until all queues have fetched their I/O commands, and return with
432a9b2780c0a01 Ming Lei      2026-07-19  4420   * ub->mutex held and readiness guaranteed: then every queue's ->canceling
432a9b2780c0a01 Ming Lei      2026-07-19  4421   * is cleared. Ready may regress between wakeup and mutex_lock() (F_BATCH
432a9b2780c0a01 Ming Lei      2026-07-19  4422   * UNPREP, daemon death), so re-check it under the mutex and wait again.
432a9b2780c0a01 Ming Lei      2026-07-19  4423   */
432a9b2780c0a01 Ming Lei      2026-07-19  4424  static int ublk_wait_dev_ready_and_lock(struct ublk_device *ub)
432a9b2780c0a01 Ming Lei      2026-07-19  4425  {
432a9b2780c0a01 Ming Lei      2026-07-19  4426  	while (true) {
432a9b2780c0a01 Ming Lei      2026-07-19  4427  		if (wait_var_event_interruptible(&ub->nr_queue_ready,
432a9b2780c0a01 Ming Lei      2026-07-19  4428  						 ublk_dev_ready(ub)))
432a9b2780c0a01 Ming Lei      2026-07-19  4429  			return -EINTR;
432a9b2780c0a01 Ming Lei      2026-07-19  4430  
432a9b2780c0a01 Ming Lei      2026-07-19 @4431  		mutex_lock(&ub->mutex);
432a9b2780c0a01 Ming Lei      2026-07-19  4432  		if (ublk_dev_ready(ub))
432a9b2780c0a01 Ming Lei      2026-07-19 @4433  			return 0;
432a9b2780c0a01 Ming Lei      2026-07-19  4434  		mutex_unlock(&ub->mutex);
432a9b2780c0a01 Ming Lei      2026-07-19  4435  	}
432a9b2780c0a01 Ming Lei      2026-07-19  4436  }
432a9b2780c0a01 Ming Lei      2026-07-19  4437  

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-07-23 16:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-23 16:55 [axboe:block-7.2 42/44] drivers/block/ublk_drv.c:4433:3-9: preceding lock on line 4431 kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.