Spdk/module
Ziye Yang f99d46d5f7 bdev/aio: move disk free operation in spdk_io_device_unregister's call back
Recently, checked the spdk_io_device_unregister function,
it will have deferred free behaviour, and the io_device
will possibly be freed in put_io_channel function.

And this means that it is not safe to directly call:
    spdk_io_device_unregister (io_device, NULL);
    Then free io_device relately resource.

Because there will be channel to use the resources associated
with io_device. Then we will possibly cause a NULL pointer access.

I found this issue in bdev rbd module, and I think that the
same issue could happen in other modules. So it is better to put the
resource free function as the call back function.

Change-Id: Icc1f86d72b672faefb3b7f416030b818a8cf45ce
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7646
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-05-11 11:50:48 +00:00
..
accel idxd: Do not present pci device info in accel_engine_idxd.c module 2021-05-10 11:12:40 +00:00
bdev bdev/aio: move disk free operation in spdk_io_device_unregister's call back 2021-05-11 11:50:48 +00:00
blob module/blob: remove deprecated spdk_bdev_create_bs_dev/from_desc() 2021-03-05 08:33:45 +00:00
blobfs so_ver: increase all major versions 2021-02-05 14:43:47 +00:00
env_dpdk so_ver: increase all major versions 2021-02-05 14:43:47 +00:00
event subsystem/nvmf: remove cpu_mask hint when creating poll group 2021-05-11 11:49:52 +00:00
sock sock: Add new params to configure zcopy for server, client sockets 2021-04-27 08:13:32 +00:00
Makefile build: install generated pkg-config files 2021-03-17 11:10:45 +00:00