numam-dpdk/lib
Jianfeng Tan cab278dee9 vhost: fix crash
In a running VM, operations (like device attach/detach) will
trigger the QEMU to resend set_mem_table to vhost-user backend.

DPDK vhost-user handles this message rudely by unmap all existing
regions and map new ones. This might lead to segfault if there
is pmd thread just trying to touch those unmapped memory regions.

But for most cases, except VM memory hotplug, QEMU still sends the
set_mem_table message even the memory regions are not changed as
QEMU vhost-user filters out those not backed by file (fd > 0).

To fix this case, we add a check in the handler to see if the
memory regions are really changed; if not, we just keep old memory
regions.

Fixes: 8f972312b8 ("vhost: support vhost-user")
CC: stable@dpdk.org

Reported-by: Yang Zhang <zy107165@alibaba-inc.com>
Reported-by: Xin Long <longxin.xl@alibaba-inc.com>
Signed-off-by: Yi Yang <yi.y.yang@intel.com>
Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Yuanhan Liu <yliu@fridaylinux.org>
2018-01-16 18:47:49 +01:00
..
librte_acl lib: use SPDX tag for Cavium copyright files 2018-01-09 16:19:01 +01:00
librte_bitratestats lib: use SPDX tag for Intel copyright files 2018-01-04 22:41:39 +01:00
librte_cfgfile lib: use SPDX tag for Intel copyright files 2018-01-04 22:41:39 +01:00
librte_cmdline cmdline: support backspace key 2018-01-15 12:04:57 +01:00
librte_compat fix typos using codespell utility 2017-06-14 23:54:13 +02:00
librte_cryptodev lib: use SPDX tag for Intel copyright files 2018-01-04 22:41:39 +01:00
librte_distributor distributor: remove unnecessary parenthesis 2018-01-05 22:08:24 +01:00
librte_eal eal: remove another use of register keyword 2018-01-15 18:58:49 +01:00
librte_efd lib: remove unnecessary pointer cast 2018-01-16 01:53:35 +01:00
librte_ether ethdev: fix typo in functions comment 2018-01-16 18:47:49 +01:00
librte_eventdev lib: use SPDX tag for Cavium copyright files 2018-01-09 16:19:01 +01:00
librte_flow_classify flow_classify: remove table id parameter from API 2018-01-11 19:15:26 +01:00
librte_gro gro: support VxLAN GRO 2018-01-11 23:18:36 +01:00
librte_gso lib: use SPDX tag for Intel copyright files 2018-01-04 22:41:39 +01:00
librte_hash lib: remove unnecessary pointer cast 2018-01-16 01:53:35 +01:00
librte_ip_frag lib: use SPDX tag for Intel copyright files 2018-01-04 22:41:39 +01:00
librte_jobstats lib: use SPDX tag for Intel copyright files 2018-01-04 22:41:39 +01:00
librte_kni lib: use SPDX tag for Intel copyright files 2018-01-04 22:41:39 +01:00
librte_kvargs mk: do not generate LDLIBS from directory dependencies 2017-10-24 02:14:57 +02:00
librte_latencystats lib: use SPDX tag for Intel copyright files 2018-01-04 22:41:39 +01:00
librte_lpm lib: remove unnecessary pointer cast 2018-01-16 01:53:35 +01:00
librte_mbuf mbuf: add PPPoE and L2TP packet types 2018-01-16 18:47:49 +01:00
librte_member lib: remove unnecessary pointer cast 2018-01-16 01:53:35 +01:00
librte_mempool mempool: fix first memory area notification 2018-01-12 18:30:20 +01:00
librte_meter lib: use SPDX tag for Intel copyright files 2018-01-04 22:41:39 +01:00
librte_metrics lib: use SPDX tag for Intel copyright files 2018-01-04 22:41:39 +01:00
librte_net lib: use SPDX tag for Cavium copyright files 2018-01-09 16:19:01 +01:00
librte_pci remove useless memzone includes 2017-11-06 22:12:08 +01:00
librte_pdump lib: use SPDX tag for Intel copyright files 2018-01-04 22:41:39 +01:00
librte_pipeline lib: remove unnecessary pointer cast 2018-01-16 01:53:35 +01:00
librte_port lib: use SPDX tag for Intel copyright files 2018-01-04 22:41:39 +01:00
librte_power power: clean KVM files 2018-01-12 00:37:07 +01:00
librte_reorder lib: use SPDX tag for Intel copyright files 2018-01-04 22:41:39 +01:00
librte_ring lib: use SPDX tag for Intel copyright files 2018-01-04 22:41:39 +01:00
librte_sched lib: use SPDX tag for Intel copyright files 2018-01-04 22:41:39 +01:00
librte_security lib: use SPDX tag for Intel copyright files 2018-01-04 22:41:39 +01:00
librte_table lib: use SPDX tag for Cavium copyright files 2018-01-09 16:19:01 +01:00
librte_timer timer: fix reset on service cores 2018-01-16 01:48:20 +01:00
librte_vhost vhost: fix crash 2018-01-16 18:47:49 +01:00
Makefile kni: fix build dependency 2018-01-11 19:15:26 +01:00