Spdk/lib/env_dpdk
Darek Stojaczyk 7c6f0ef001 env_dpdk/pci: fix segfault on simultaneous VFIO hotremove and user detach
There was a chance we scheduled a device removal to the DPDK thread
while that thread was already removing the device from a VFIO hotremove
notification (on the DPDK interrupt thread). The second hotremove
attempt touches some freed memory and segfaults.

The VFIO hotremove notification already checks pending_removal flag
under a mutex and sets it to true, so do the same in spdk_detach_rte()
(called from the SPDK init thread).

Change-Id: Ib3f0eb7c0c5c6e1ab8cf253b7711fd149925a143
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1730
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
2020-07-23 20:48:47 +00:00
..
env_internal.h lib/env_dpdk: rename pci_init/fini() to pci_env_init/fini() 2020-05-28 07:12:42 +00:00
env.c env: add a new function for printing memory layout 2019-12-13 11:05:57 +00:00
env.mk dpdkbuild: build and link with rte_hash if RAID5 is built 2020-03-18 08:02:43 +00:00
init.c event: add iova-mode parameter 2020-06-24 08:22:24 +00:00
Makefile env_dpdk: expose base virtaddr as an option 2020-06-16 07:45:07 +00:00
memory.c lib: accel, bdev, blob, env_dpdk remove spdk_ prefix. 2020-05-21 09:19:00 +00:00
pci_idxd.c lib/idxd: add low level idxd library 2020-04-23 15:48:32 +00:00
pci_ioat.c lib/env_dpdk: remove spdk prefix from internal functions. 2020-04-22 09:21:55 +00:00
pci_nvme.c lib/env_dpdk: remove spdk prefix from internal functions. 2020-04-22 09:21:55 +00:00
pci_virtio.c env: add the device ID of virtio device 2020-05-12 08:12:22 +00:00
pci_vmd.c lib/env_dpdk: remove spdk prefix from internal functions. 2020-04-22 09:21:55 +00:00
pci.c env_dpdk/pci: fix segfault on simultaneous VFIO hotremove and user detach 2020-07-23 20:48:47 +00:00
spdk_env_dpdk.map module/idxd: accel framework plug-in for idxd 2020-04-23 15:48:32 +00:00
threads.c env: drop DPDK 16.07 support 2018-11-30 19:59:34 +00:00