Spdk/include/spdk
Mike Gerdts 7241a075be bdev: hold spinlock while changing claim_module
This closes races between concurrent spdk_bdev_module_claim_bdev()
and/or spdk_bdev_module_release_bdev() calls affecting the same bdev by
holding bdev->internal.spinlock while claiming and releasing a bdev. It
also closes a potential TOCTOU bug in that optimizing compilers probably
already eliminate in bdev_finish_unregister_bdevs_iter() and documents
that bdev->internal.claim_module is protected by
bdev->internal.spinlock.

This can be removed when the bdev_register_examine_thread deprecation
is removed.

Signed-off-by: Mike Gerdts <mgerdts@nvidia.com>
Change-Id: Ib48552df065d5172139a61bbc00b391f36552c0c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15282
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Mellanox Build Bot
2023-01-05 23:28:32 +00:00
..
accel.h misc: Fix spelling mistakes 2022-12-09 08:16:18 +00:00
assert.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
barrier.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
base64.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
bdev_module.h bdev: hold spinlock while changing claim_module 2023-01-05 23:28:32 +00:00
bdev_zone.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
bdev.h bdev: examine and register on app thread 2023-01-05 23:28:32 +00:00
bit_array.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
bit_pool.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
blob_bdev.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
blob.h misc: Fix spelling mistakes 2022-12-09 08:16:18 +00:00
blobfs_bdev.h build: compile API functions with missing deps 2022-11-18 08:40:05 +00:00
blobfs.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
conf.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
cpuset.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
crc16.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
crc32.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
dif.h misc: Fix spelling mistakes 2022-12-09 08:16:18 +00:00
dma.h Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
endian.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
env_dpdk.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
env.h lib/env_dpdk: Add support for vfio-vf-token parameter 2022-12-12 09:41:25 +00:00
event.h lib/env_dpdk: Add support for vfio-vf-token parameter 2022-12-12 09:41:25 +00:00
fd_group.h util: add function spdk_fd_group_get_epoll_event 2022-11-22 10:01:43 +00:00
fd.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
file.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
ftl.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
gpt_spec.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
hexlify.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
histogram_data.h histogram_data: check bucket_shift when merging 2022-12-21 09:32:40 +00:00
idxd_spec.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
idxd.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
init.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
ioat_spec.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
ioat.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
iscsi_spec.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
json.h json: add spdk_json_write_named_double 2022-11-22 10:01:43 +00:00
jsonrpc.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
likely.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
log.h log: add deprecated tracking API 2022-12-07 17:45:53 +00:00
lvol.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
memory.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
mmio.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
nbd.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
notify.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
nvme_intel.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
nvme_ocssd_spec.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
nvme_ocssd.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
nvme_spec.h nvme: Add new values to nvme_status_code enums based on NVMe 2.0c 2023-01-04 08:22:31 +00:00
nvme_zns.h Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
nvme.h nvme: fix a typo in doxygen comment 2023-01-05 23:26:07 +00:00
nvmf_cmd.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
nvmf_fc_spec.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
nvmf_spec.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
nvmf_transport.h nvmf: make poll groups count unassociated qpairs 2022-12-01 10:57:29 +00:00
nvmf.h nvmf: add completed_nvme_io to nvmf_poll_group_stat 2022-12-16 09:27:50 +00:00
opal_spec.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
opal.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
pci_ids.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
pipe.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
queue_extras.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
queue.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
reduce.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
rpc.h lib/rpc: add RPC allow list 2022-11-15 08:31:02 +00:00
scheduler.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
scsi_spec.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
scsi.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
sock.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
stdinc.h env_dpdk: fix check for AMD iommu 2022-11-15 08:31:13 +00:00
string.h lib/util: add strarray utility functions 2022-11-15 08:31:02 +00:00
thread.h thread: cache a number of iobuf buffers on each channel 2022-12-16 09:06:07 +00:00
trace_parser.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
trace.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
tree.h util: rename RB_ROOT into _RB_ROOT 2021-06-04 22:46:40 +00:00
util.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
uuid.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
version.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
vfio_user_pci.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
vfio_user_spec.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
vfu_target.h lib/vfu_target: add missed comments to vfu_target.h 2022-12-02 10:44:51 +00:00
vhost.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
vmd.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
xor.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
zipf.h update Intel copyright notices 2022-11-10 08:28:53 +00:00