All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Julia Lawall <julia.lawall@inria.fr>
Subject: [axboe:block-7.2 42/44] drivers/block/ublk_drv.c:4433:3-9: preceding lock on line 4431
Date: Fri, 24 Jul 2026 00:55:32 +0800	[thread overview]
Message-ID: <202607240051.mmC9T4aB-lkp@intel.com> (raw)

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

                 reply	other threads:[~2026-07-23 16:56 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202607240051.mmC9T4aB-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=julia.lawall@inria.fr \
    --cc=oe-kbuild@lists.linux.dev \
    /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 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.