85a61ea6f0
bdev hotremove event is send directly to hotremove callback given during spdk_scsi_dev_construct() call. So any bdev hotremove might be promoted to whole SCSI device removal (like in vhost) wich will trigger LUN removal. But after returning from hotremove callback LUN and device might be still referenced (eg to register poller or by outstanding IO). Even worse: spdk_scsi_dev object is not dynamicaly allocated but returned from static array which mean there is no way to detect use-after-free error on spdk_scsi_dev by any tool. This might lead to using SCSI device that is freed or assigned to different device. To fix this: - always delete LUN using hotremove path - defer spdk_scsi_dev delete/removal after all LUNS are really deleted. Change-Id: I65598bf42cd507f620095dff5d32509a0424d060 Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com> Reviewed-on: https://review.gerrithub.io/393674 Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> |
||
---|---|---|
.. | ||
include | ||
lib | ||
Makefile |