Spdk/lib
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 misc: Fix spelling mistakes 2022-12-09 08:16:18 +00:00
bdev bdev: hold spinlock while changing claim_module 2023-01-05 23:28:32 +00:00
blob blobstore: missing lock leads to md page race 2022-12-20 09:19:09 +00:00
blobfs blob: Add translate_lba operation 2022-12-08 12:54:54 +00:00
conf update Intel copyright notices 2022-11-10 08:28:53 +00:00
dma update Intel copyright notices 2022-11-10 08:28:53 +00:00
env_dpdk lib/env_dpdk: add a valid check before fclose 2022-12-16 09:43:47 +00:00
env_ocf update Intel copyright notices 2022-11-10 08:28:53 +00:00
event app: enable configurable msg_mempool_size for reactor 2022-12-14 08:04:55 +00:00
ftl misc: Fix spelling mistakes 2022-12-09 08:16:18 +00:00
idxd lib/idxd: change max idxd completions processed 2022-12-08 12:55:58 +00:00
init misc: Fix spelling mistakes 2022-12-09 08:16:18 +00:00
ioat update Intel copyright notices 2022-11-10 08:28:53 +00:00
iscsi iscsi: add EXITING conns to pg after full_feature_migrate 2022-12-23 09:27:48 +00:00
json json: add spdk_json_write_named_double 2022-11-22 10:01:43 +00:00
jsonrpc lib/jsonrpc: check the return value from setsockopt 2022-12-20 09:17:59 +00:00
log log: add deprecated tracking API 2022-12-07 17:45:53 +00:00
lvol lib/lvol: bad cluster size error message 2022-12-16 09:26:35 +00:00
nbd update Intel copyright notices 2022-11-10 08:28:53 +00:00
notify update Intel copyright notices 2022-11-10 08:28:53 +00:00
nvme nvme: fix memleak when submit request failed 2023-01-05 23:26:42 +00:00
nvmf nvmf/vfio_user: add numdw to avoide signed integer overflow 2023-01-05 23:27:12 +00:00
rdma update Intel copyright notices 2022-11-10 08:28:53 +00:00
reduce update Intel copyright notices 2022-11-10 08:28:53 +00:00
rocksdb rocksdb: remove spdk_thread 2022-11-23 08:22:04 +00:00
rpc lib/rpc: add RPC allow list 2022-11-15 08:31:02 +00:00
scsi misc: Fix spelling mistakes 2022-12-09 08:16:18 +00:00
sock sock: set errno in spdk_sock_flush() 2022-12-01 12:49:04 +00:00
thread thread: cache a number of iobuf buffers on each channel 2022-12-16 09:06:07 +00:00
trace lib/trace: add trace_get_info RPC 2022-12-05 09:50:38 +00:00
trace_parser update Intel copyright notices 2022-11-10 08:28:53 +00:00
ut_mock update Intel copyright notices 2022-11-10 08:28:53 +00:00
util util: add function spdk_fd_group_get_epoll_event 2022-11-22 10:01:43 +00:00
vfio_user update Intel copyright notices 2022-11-10 08:28:53 +00:00
vfu_tgt update Intel copyright notices 2022-11-10 08:28:53 +00:00
vhost lib/vhost: explicitly set the initial value for local variable 2022-12-13 09:26:06 +00:00
virtio lib/virtio: add the ctx NULL check before dereferencing it 2022-11-30 08:50:48 +00:00
vmd update Intel copyright notices 2022-11-10 08:28:53 +00:00
Makefile configure: rename --with-reduce --with-vbdev-compress 2022-12-08 12:55:27 +00:00