Spdk/lib
Vitaliy Mysak 6b654ab900 bdev: prevent early spdk_bdev_init_complete()
In case some module has `async_init = true` and
  some other module that comes after it fails to initialize,
  then callback from asynchronously initialized module
  may call `spdk_bdev_init_complete()` first, then failed module
  will call `spdk_bdev_init_complete()` later.
  This currently results in NULL dereference because
  first call to `spdk_bdev_init_complete()` sets `g_init_cb_fn = NULL`.

This change prevents first call to `spdk_bdev_init_complete()`
  by saying that failed module is not finished with initialization.

This patch fixes #847

Change-Id: Ib6b231d5ea27896ad88d7f11b8732921077b3d4d
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/461230
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2019-07-12 04:14:58 +00:00
..
bdev bdev: prevent early spdk_bdev_init_complete() 2019-07-12 04:14:58 +00:00
blob lib/blob: do not allow xattr to exceed maximum descriptor length 2019-07-11 10:05:41 +00:00
blobfs blobfs: make internal asynchronous APIs as public APIs 2019-06-28 09:50:50 +00:00
conf string: spdk_strtol to delegate additional error checking 2019-01-29 00:10:57 +00:00
copy misc/rpc: rename some C functions of rpc methods 2019-05-07 05:30:16 +00:00
env_dpdk env: Add an API to lookup the memory pool created by the primary process 2019-07-01 14:47:30 +00:00
event nvmf: spdk_nvmf_subsystem_remove_ns is no longer asynchronous 2019-07-11 11:19:53 +00:00
ftl ftl_reloc: Fix scanbuild warning about moves. 2019-07-04 00:25:17 +00:00
ioat ioat: allocate device struct using regular calloc 2019-04-09 06:30:42 +00:00
iscsi sock: update spdk_sock_group_add_sock 2019-07-04 08:21:05 +00:00
json json_util: fix typo in debug message. 2019-05-31 14:39:53 +00:00
jsonrpc jsonrpc: Reorder spdk_jsonrpc_server_write_cb 2019-07-01 13:09:52 +00:00
log log: passing user-defined log 2019-06-18 03:56:50 +00:00
lvol lvol: Fix for lvol failed deletion flow 2019-04-02 19:23:22 +00:00
nbd nbd: optional nbd_device in start_nbd_disk 2019-04-04 08:35:50 +00:00
net net: Use spdk_json_write_named_* APIs throughout 2019-02-04 07:08:04 +00:00
notify lib/notify: rename spdk_notify_get_events to spdk_notify_foreach_event 2019-05-07 06:11:27 +00:00
nvme nvme: Handle CQ polling failures by marking the controller as failed. 2019-07-09 01:43:02 +00:00
nvmf nvmf: spdk_nvmf_subsystem_remove_ns is no longer asynchronous 2019-07-11 11:19:53 +00:00
reduce lib/reduce: fix bug with adding up req->decomp_iovcnt 2019-07-12 04:05:52 +00:00
rocksdb RocksDB: Remove static and assert for SpdkInitializeThread 2019-07-05 04:19:11 +00:00
rpc rpc: rename RPC get_rpc_methods to rpc_get_methods 2019-05-27 12:52:53 +00:00
scsi scsi: fix error break when checking SCSI reservation 2019-07-04 08:15:44 +00:00
sock sock: update spdk_sock_group_add_sock 2019-07-04 08:21:05 +00:00
thread thread: Assign not pointer but instance of spdk_cpuset in struct spdk_thread 2019-07-04 00:30:22 +00:00
trace trace: print error message if event name is too long 2019-05-02 08:41:56 +00:00
ut_mock thread: Eliminate use of pthread_self and thread_ids 2019-01-15 16:53:12 +00:00
util dif: Add spdk_dix_remap_ref_tag to remap ref. tag for separate metadata payload 2019-07-11 11:14:22 +00:00
vhost vhost: add a single dpdk semaphore 2019-07-01 12:50:57 +00:00
virtio lib/virtio: change the definition of cookie 2019-06-26 08:03:37 +00:00
vmd lib/env: Added parent field to spdk_pci_device 2019-07-09 04:04:16 +00:00
Makefile vmd: Initial SPDK VMD baseline code 2019-05-30 17:32:43 +00:00