Spdk/lib/bdev
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
..
aio aio/rpc: Add more descriptive error messages for aio bdevs 2019-07-10 08:29:21 +00:00
compress bdev/compress: add RPC to specify PMD 2019-06-26 07:57:09 +00:00
crypto bdev/crypto: add more descriptive rpc error messages 2019-07-10 08:29:21 +00:00
delay bdev: Create a new delay vbdev module 2019-05-31 14:37:26 +00:00
error bdev: make spdk_bdev_register_module_xxx function names predictable 2019-02-11 23:56:53 +00:00
gpt bdev/gpt: call get buffer function before forwarding read I/O to the base bdev 2019-07-12 02:25:57 +00:00
iscsi bdev/iscsi: fix iscsi bdev wrong lun id 2019-04-01 01:16:51 +00:00
lvol blobstore: Make possible to remove snapshot if there is only one clone 2019-06-18 13:19:32 +00:00
malloc bdev/rpc: Add descriptive error messages for malloc bdevs 2019-07-10 08:29:21 +00:00
null null/rpc: Add more descriptive error messages for null bdevs 2019-07-10 08:29:21 +00:00
nvme nvme/rpc: switch to spdk_*malloc(). 2019-07-05 03:48:51 +00:00
ocf ocf: Improve handling of partial IOs 2019-06-07 18:18:42 +00:00
passthru bdev/passthru: Pass-through metadata and DIF setting of base bdev 2019-07-04 09:23:07 +00:00
pmem bdev: process failure of spdk_bdev_io_get_buf_cb in each bdev module 2019-02-27 07:28:15 +00:00
raid bdev/raid: fix a warning of freed memory 2019-07-05 12:10:07 +00:00
rbd bdev: process failure of spdk_bdev_io_get_buf_cb in each bdev module 2019-02-27 07:28:15 +00:00
rpc bdev: make bdevs array for get_bdevs_iostat RPC 2019-05-08 22:43:00 +00:00
split bdev/split: call get buffer function before forwarding read I/O to the base bdev 2019-07-12 02:25:57 +00:00
uring bdev/uring: adjust to the latest io_uring API 2019-06-07 18:43:07 +00:00
virtio env: Add free_space parameter to spdk_ring_enqueue 2019-06-05 05:23:58 +00:00
bdev.c bdev: prevent early spdk_bdev_init_complete() 2019-07-12 04:14:58 +00:00
Makefile bdev: add uring in bdev Makefile 2019-06-11 00:26:48 +00:00
part.c bdev/part: Remap DIF reference tag for read/write I/O 2019-07-11 11:14:22 +00:00
scsi_nvme.c bdev: move error union to internal spdk_bdev_io struct 2018-06-26 20:04:07 +00:00
vtune.c mk: don't use '-include spdk/config.h' 2018-10-02 23:13:32 +00:00