Spdk/test/unit/lib/bdev
Krzysztof Karas e64728f092 bdev/crypto: make sure that vbdev_crypto_destruct() returns 1
Make vbdev_crypto_destruct() return 1 to signal that program
execution should wait for spdk_bdev_destruct_done() function,
which is added inside _device_unregister_cb().

This change is related to _vdev_dev_get() not being able
to find the devices, when called from _cryptodev_sym_session_free(),
as it uses device driver name, which might already be freed.
This occurs only during bdev module finish, when crypto bdevs
are being unregistered and vbdev_crypto_finish() proceeds to
call bdev name deletion without waiting for the unregister
callbacks to complete, which ultimately results in reading
freed pointers.

This only happens when code execution takes path for DPDK 22.11+.

Change-Id: Id9a43d07c90aef7a82867383fd77354ac521a3e7
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16290
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2023-01-19 10:28:52 +00:00
..
bdev_zone.c update Intel copyright notices 2022-11-10 08:28:53 +00:00
bdev.c bdev: add claim type 2023-01-05 23:28:32 +00:00
compress.c update Intel copyright notices 2022-11-10 08:28:53 +00:00
crypto.c bdev/crypto: make sure that vbdev_crypto_destruct() returns 1 2023-01-19 10:28:52 +00:00
gpt update Intel copyright notices 2022-11-10 08:28:53 +00:00
mt bdev: examine and register on app thread 2023-01-05 23:28:32 +00:00
nvme bdev_nvme: record io paths' stat before being destroyed 2023-01-19 01:57:11 +00:00
part.c lib/part: check the return of spdk_bdev_register 2023-01-18 15:15:02 +00:00
pmem update Intel copyright notices 2022-11-10 08:28:53 +00:00
raid bdev/raid0: Support resize when increasing the size of base bdevs 2023-01-17 19:45:34 +00:00
scsi_nvme.c update Intel copyright notices 2022-11-10 08:28:53 +00:00
vbdev_lvol.c update Intel copyright notices 2022-11-10 08:28:53 +00:00
vbdev_zone_block.c bdev: add claim type 2023-01-05 23:28:32 +00:00
Makefile configure: rename --with-reduce --with-vbdev-compress 2022-12-08 12:55:27 +00:00