Building the Linux kernel with Clang and LLVM
 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 36/36] drivers/fpga/tests/fpga-bridge-test.c:89:2: warning: releasing mutex 'ctx->bridge->mutex' that was not held
Date: Sun, 9 Feb 2025 00:27:47 +0800	[thread overview]
Message-ID: <Z6eGA3fcam9bFDJu@rli9-mobl> (raw)

tree:   https://github.com/bvanassche/linux thread-safety
head:   ce14c650535d31959070629f347cb214f6e51d3d
commit: ce14c650535d31959070629f347cb214f6e51d3d [36/36] scripts/Makefile.clang: Unconditionally enable thread-safety checking
:::::: branch date: 26 hours ago
:::::: commit date: 26 hours ago
config: hexagon-randconfig-001-20250207 (https://download.01.org/0day-ci/archive/20250207/202502071055.yME9ASTo-lkp@intel.com/config)
compiler: clang version 21.0.0git (https://github.com/llvm/llvm-project ee3bccab34f57387bdf33853cdd5f214fef349a2)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250207/202502071055.yME9ASTo-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/202502071055.yME9ASTo-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/fpga/tests/fpga-bridge-test.c:89:2: warning: releasing mutex 'ctx->bridge->mutex' that was not held [-Wthread-safety-analysis]
      89 |         fpga_bridge_put(ctx->bridge);
         |         ^
   1 warning generated.
--
>> drivers/fpga/tests/fpga-mgr-test.c:224:2: warning: releasing mutex 'ctx->mgr->ref_mutex' that was not held [-Wthread-safety-analysis]
     224 |         fpga_mgr_unlock(ctx->mgr);
         |         ^
   1 warning generated.


vim +89 drivers/fpga/tests/fpga-bridge-test.c

9e6823481e5f6f Marco Pagani 2023-07-18  77  
9e6823481e5f6f Marco Pagani 2023-07-18  78  static void fpga_bridge_test_get(struct kunit *test)
9e6823481e5f6f Marco Pagani 2023-07-18  79  {
9e6823481e5f6f Marco Pagani 2023-07-18  80  	struct bridge_ctx *ctx = test->priv;
9e6823481e5f6f Marco Pagani 2023-07-18  81  	struct fpga_bridge *bridge;
9e6823481e5f6f Marco Pagani 2023-07-18  82  
4d2bc3f7dea4d1 Marco Pagani 2024-03-29  83  	bridge = fpga_bridge_get(ctx->dev, NULL);
9e6823481e5f6f Marco Pagani 2023-07-18  84  	KUNIT_EXPECT_PTR_EQ(test, bridge, ctx->bridge);
9e6823481e5f6f Marco Pagani 2023-07-18  85  
4d2bc3f7dea4d1 Marco Pagani 2024-03-29  86  	bridge = fpga_bridge_get(ctx->dev, NULL);
9e6823481e5f6f Marco Pagani 2023-07-18  87  	KUNIT_EXPECT_EQ(test, PTR_ERR(bridge), -EBUSY);
9e6823481e5f6f Marco Pagani 2023-07-18  88  
9e6823481e5f6f Marco Pagani 2023-07-18 @89  	fpga_bridge_put(ctx->bridge);
9e6823481e5f6f Marco Pagani 2023-07-18  90  }
9e6823481e5f6f Marco Pagani 2023-07-18  91  

:::::: The code at line 89 was first introduced by commit
:::::: 9e6823481e5f6f2d4f4b43b6f3b00ace21b83f25 fpga: add an initial KUnit suite for the FPGA Bridge

:::::: TO: Marco Pagani <marpagan@redhat.com>
:::::: CC: Xu Yilun <yilun.xu@intel.com>

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


                 reply	other threads:[~2025-02-08 16:28 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=Z6eGA3fcam9bFDJu@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