All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-nvme:nvme-6.5 15/21] drivers/nvme/host/fabrics.c:96:2-8: preceding lock on line 85
@ 2023-06-02  1:57 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-06-02  1:57 UTC (permalink / raw)
  To: oe-kbuild; +Cc: lkp, Julia Lawall

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-06-02  1:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-02  1:57 [linux-nvme:nvme-6.5 15/21] drivers/nvme/host/fabrics.c:96:2-8: preceding lock on line 85 kernel test robot

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.