vhost: fix crash by removing device when requested
authorHuawei Xie <huawei.xie@intel.com>
Tue, 3 Mar 2015 02:26:04 +0000 (10:26 +0800)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Thu, 5 Mar 2015 21:08:27 +0000 (22:08 +0100)
commit391b5f425c4613e649e5353ed8161e75967b0f3a
treeb583d7d6f21785dcb9df4cf556ddffb8522629f1
parent5e62bdde85111235255a6110229696b4b2be2518
vhost: fix crash by removing device when requested

This patch fixes the segfault issue in the case vhost receives
new VHOST_SET_MEM_TABLE message without VHOST_VRING_GET_VRING_BASE
(which we uses as the stop message).

Signed-off-by: Huawei Xie <huawei.xie@intel.com>
Acked-by: Tommy Long <thomas.long@intel.com>
lib/librte_vhost/vhost_user/virtio-net-user.c