numam-spdk/lib/vhost
Darek Stojaczyk 47cf47e482 vhost/scsi: don't send events when eventq is unset
We do technically support initiators without eventq or
controlq, but the lun hotplug/hotremove path expected the
eventq to be always present.

This was causing vhost to randomly crash in the fuzz tests.
Specifically, the crash happened if lun hotplug was handled
while a VM was in the middle of switching from BIOS to OS.

We fix it by checking if eventq is set before putting
any event there. LUN hotplug and hotremove won't work
without an eventq, but the entire session will be restarted
after new queues are initialized. This will make the VM
retrieve all up-to-date luns after OS initialization is
complete.

Change-Id: I5d28cbedad8fb2a35ede5a491aeb7fdc52faad06
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/451789
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2019-04-24 16:46:09 +00:00
..
rte_vhost rte_vhost: introduce get/set vring base idx APIs 2019-02-27 01:43:16 +00:00
Makefile vhost: install external msg handling hooks to rte_vhost 2019-03-13 14:26:20 +00:00
rte_vhost_compat.c vhost/compat: implement SET/GET_CONFIG 2019-03-15 22:03:26 +00:00
vhost_blk.c vhost: allocate device objects with regular calloc 2019-04-22 16:50:37 +00:00
vhost_internal.h vhost: ignore sessions that weren't ever started 2019-04-22 15:41:51 +00:00
vhost_nvme.c vhost: allocate device objects with regular calloc 2019-04-22 16:50:37 +00:00
vhost_rpc.c configure: add option not to use the internal rte_vhost copy 2019-03-13 14:26:20 +00:00
vhost_scsi.c vhost/scsi: don't send events when eventq is unset 2019-04-24 16:46:09 +00:00
vhost.c vhost: allocate device objects with regular calloc 2019-04-22 16:50:37 +00:00