From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Julia Lawall <julia.lawall@inria.fr>
Subject: [linux-nvme:nvme-6.5 15/21] drivers/nvme/host/fabrics.c:96:2-8: preceding lock on line 85
Date: Fri, 2 Jun 2023 09:57:07 +0800 [thread overview]
Message-ID: <202306020909.MTUEBeIa-lkp@intel.com> (raw)
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-nvme@lists.infradead.org
TO: Max Gurtovoy <mgurtovoy@nvidia.com>
CC: Keith Busch <kbusch@kernel.org>
CC: Israel Rukshin <israelr@nvidia.com>
CC: Christoph Hellwig <hch@lst.de>
tree: git://git.infradead.org/nvme.git nvme-6.5
head: 14ad91f7a9a29562f23bedd205ef209255d8b8d1
commit: f0cebf82004d610be3ef47abf315ddf95aa2dcd1 [15/21] nvme-fabrics: prevent overriding of existing host
:::::: branch date: 9 hours ago
:::::: commit date: 3 weeks ago
config: riscv-randconfig-c032-20230531 (https://download.01.org/0day-ci/archive/20230602/202306020909.MTUEBeIa-lkp@intel.com/config)
compiler: riscv64-linux-gcc (GCC) 12.3.0
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Julia Lawall <julia.lawall@inria.fr>
| Closes: https://lore.kernel.org/r/202306020909.MTUEBeIa-lkp@intel.com/
cocci warnings: (new ones prefixed by >>)
>> drivers/nvme/host/fabrics.c:96:2-8: preceding lock on line 85
vim +96 drivers/nvme/host/fabrics.c
f0cebf82004d61 Max Gurtovoy 2023-05-12 80
f0cebf82004d61 Max Gurtovoy 2023-05-12 81 static struct nvmf_host *nvmf_host_add(const char *hostnqn, uuid_t *id)
07bfcd09a28855 Christoph Hellwig 2016-06-13 82 {
07bfcd09a28855 Christoph Hellwig 2016-06-13 83 struct nvmf_host *host;
07bfcd09a28855 Christoph Hellwig 2016-06-13 84
07bfcd09a28855 Christoph Hellwig 2016-06-13 @85 mutex_lock(&nvmf_hosts_mutex);
f0cebf82004d61 Max Gurtovoy 2023-05-12 86 host = __nvmf_host_find(hostnqn, id);
f0cebf82004d61 Max Gurtovoy 2023-05-12 87 if (IS_ERR(host)) {
f0cebf82004d61 Max Gurtovoy 2023-05-12 88 goto out_unlock;
f0cebf82004d61 Max Gurtovoy 2023-05-12 89 } else if (host) {
98096d8a787f05 Christoph Hellwig 2016-08-18 90 kref_get(&host->ref);
07bfcd09a28855 Christoph Hellwig 2016-06-13 91 goto out_unlock;
98096d8a787f05 Christoph Hellwig 2016-08-18 92 }
07bfcd09a28855 Christoph Hellwig 2016-06-13 93
f0cebf82004d61 Max Gurtovoy 2023-05-12 94 host = nvmf_host_alloc(hostnqn, id);
07bfcd09a28855 Christoph Hellwig 2016-06-13 95 if (!host)
f0cebf82004d61 Max Gurtovoy 2023-05-12 @96 return ERR_PTR(-ENOMEM);
07bfcd09a28855 Christoph Hellwig 2016-06-13 97
07bfcd09a28855 Christoph Hellwig 2016-06-13 98 list_add_tail(&host->list, &nvmf_hosts);
07bfcd09a28855 Christoph Hellwig 2016-06-13 99 out_unlock:
07bfcd09a28855 Christoph Hellwig 2016-06-13 100 mutex_unlock(&nvmf_hosts_mutex);
07bfcd09a28855 Christoph Hellwig 2016-06-13 101 return host;
07bfcd09a28855 Christoph Hellwig 2016-06-13 102 }
07bfcd09a28855 Christoph Hellwig 2016-06-13 103
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2023-06-02 1:57 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=202306020909.MTUEBeIa-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.