mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>,
	LKML <linux-kernel@vger.kernel.org>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: Re: [PATCH v7] block: avoid long sync_blockdev() under disk->open_mutex during parallel close
Date: Mon, 19 Oct 2026 10:29:23 +0800	[thread overview]
Message-ID: <202610191027.uw2yfQhY-lkp@intel.com> (raw)
In-Reply-To: <6efed2d0-fe66-4d29-876b-fd3b74abaa70@I-love.SAKURA.ne.jp>

Hi Tetsuo,

kernel test robot noticed the following build warnings:

[auto build test WARNING on axboe/for-next]
[also build test WARNING on linus/master v7.3 next-20261016]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Tetsuo-Handa/block-avoid-long-sync_blockdev-under-disk-open_mutex-during-parallel-close/20261017-004014
base:   https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux.git for-next
patch link:    https://lore.kernel.org/r/6efed2d0-fe66-4d29-876b-fd3b74abaa70%40I-love.SAKURA.ne.jp
patch subject: [PATCH v7] block: avoid long sync_blockdev() under disk->open_mutex during parallel close
config: um-x86_64_defconfig (https://download.01.org/0day-ci/archive/20261019/202610191027.uw2yfQhY-lkp@intel.com/config)
compiler: clang version 24.0.0git (https://github.com/llvm/llvm-project 6719b9e31d6a93099612c474eec76d9f41d0275a)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261019/202610191027.uw2yfQhY-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/oe-kbuild-all/202610191027.uw2yfQhY-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> block/bdev.c:1157:3: warning: releasing mutex 'disk->open_mutex' that was not held [-Wthread-safety-analysis]
    1157 |                 mutex_unlock(&disk->open_mutex);
         |                 ^
>> block/bdev.c:1162:1: warning: mutex 'disk->open_mutex' is not held on every path through here [-Wthread-safety-analysis]
    1162 | }
         | ^
   block/bdev.c:1159:3: note: mutex acquired here
    1159 |                 mutex_lock(&disk->open_mutex);
         |                 ^
   2 warnings generated.


vim +1157 block/bdev.c

  1152	
  1153	static inline void bd_early_sync(struct gendisk *disk, struct block_device *bdev)
  1154	{
  1155		if (atomic_read(&bdev->bd_openers) == 1 + bdev->bd_closers) {
  1156			bdev->bd_closers++;
> 1157			mutex_unlock(&disk->open_mutex);
  1158			sync_blockdev(bdev);
  1159			mutex_lock(&disk->open_mutex);
  1160			bdev->bd_closers--;
  1161		}
> 1162	}
  1163	

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

      reply	other threads:[~2026-10-19  2:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-14 12:02 [PATCH] " Tetsuo Handa
2026-10-14 13:07 ` [PATCH v2] " Tetsuo Handa
2026-10-14 14:12   ` [PATCH v3] " Tetsuo Handa
2026-10-14 16:21     ` [PATCH v4] " Tetsuo Handa
2026-10-15 10:25       ` [PATCH v5] " Tetsuo Handa
2026-10-15 11:18         ` [PATCH v6] " Tetsuo Handa
2026-10-16 15:40           ` [PATCH v7] " Tetsuo Handa
2026-10-19  2:29             ` kernel test robot [this message]

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=202610191027.uw2yfQhY-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=penguin-kernel@i-love.sakura.ne.jp \
    /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

all inboxes | Powered by JetHome®