public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Bart Van Assche <bvanassche@acm.org>
Cc: <llvm@lists.linux.dev>, <oe-kbuild-all@lists.linux.dev>
Subject: [bvanassche:thread-safety 89/94] drivers/block/sunvdc.c:1124:2: warning: releasing spinlock 'port->vio.lock' that was not held
Date: Sat, 11 Apr 2026 08:35:05 +0800	[thread overview]
Message-ID: <admXOReMNLaR6Va3@rli9-mobl> (raw)

tree:   https://github.com/bvanassche/linux thread-safety
head:   c7cad077ed44c1b494c41ee8f1b368e4f0f61c59
commit: 5266915d6dffa5b63bd017892258762fcde34657 [89/94] block: Enable lock context analysis for all block drivers
config: sparc64-allmodconfig (https://download.01.org/0day-ci/archive/20260410/202604102249.9uYKbva4-lkp@intel.com/config)
compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project ae825cb8cea7f3ac8e5e4096f22713845cf5e501)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260410/202604102249.9uYKbva4-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/r/202604102249.9uYKbva4-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/block/sunvdc.c:1124:2: warning: releasing spinlock 'port->vio.lock' that was not held [-Wthread-safety-analysis]
    1124 |         spin_unlock_irq(&port->vio.lock);
         |         ^
>> drivers/block/sunvdc.c:1133:1: warning: spinlock 'port->vio.lock' is still held at the end of function [-Wthread-safety-analysis]
    1133 | }
         | ^
   drivers/block/sunvdc.c:1129:2: note: spinlock acquired here
    1129 |         spin_lock_irq(&port->vio.lock);
         |         ^
   2 warnings generated.


vim +1124 drivers/block/sunvdc.c

76e74bbe0a38c6 Dwight Engen      2014-12-11  1113  
76e74bbe0a38c6 Dwight Engen      2014-12-11  1114  static void vdc_queue_drain(struct vdc_port *port)
76e74bbe0a38c6 Dwight Engen      2014-12-11  1115  {
fa182a1fa97dff Jens Axboe        2018-10-15  1116  	struct request_queue *q = port->disk->queue;
1e1a9cecfab3f2 Christoph Hellwig 2025-01-31  1117  	unsigned int memflags;
fa182a1fa97dff Jens Axboe        2018-10-15  1118  
fa182a1fa97dff Jens Axboe        2018-10-15  1119  	/*
fa182a1fa97dff Jens Axboe        2018-10-15  1120  	 * Mark the queue as draining, then freeze/quiesce to ensure
fa182a1fa97dff Jens Axboe        2018-10-15  1121  	 * that all existing requests are seen in ->queue_rq() and killed
fa182a1fa97dff Jens Axboe        2018-10-15  1122  	 */
fa182a1fa97dff Jens Axboe        2018-10-15  1123  	port->drain = 1;
fa182a1fa97dff Jens Axboe        2018-10-15 @1124  	spin_unlock_irq(&port->vio.lock);
76e74bbe0a38c6 Dwight Engen      2014-12-11  1125  
1e1a9cecfab3f2 Christoph Hellwig 2025-01-31  1126  	memflags = blk_mq_freeze_queue(q);
fa182a1fa97dff Jens Axboe        2018-10-15  1127  	blk_mq_quiesce_queue(q);
fa182a1fa97dff Jens Axboe        2018-10-15  1128  
fa182a1fa97dff Jens Axboe        2018-10-15  1129  	spin_lock_irq(&port->vio.lock);
fa182a1fa97dff Jens Axboe        2018-10-15  1130  	port->drain = 0;
64b48ec36dbed5 Stephen Rothwell  2025-02-03  1131  	blk_mq_unquiesce_queue(q);
64b48ec36dbed5 Stephen Rothwell  2025-02-03  1132  	blk_mq_unfreeze_queue(q, memflags);
76e74bbe0a38c6 Dwight Engen      2014-12-11 @1133  }
76e74bbe0a38c6 Dwight Engen      2014-12-11  1134  

:::::: The code at line 1124 was first introduced by commit
:::::: fa182a1fa97dff56cda742f22d17d666420cd27f sunvdc: convert to blk-mq

:::::: TO: Jens Axboe <axboe@kernel.dk>
:::::: CC: Jens Axboe <axboe@kernel.dk>

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


                 reply	other threads:[~2026-04-11  0:35 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=admXOReMNLaR6Va3@rli9-mobl \
    --to=lkp@intel.com \
    --cc=bvanassche@acm.org \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox