From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 5FA968E64 for ; Fri, 18 Sep 2015 16:59:58 +0200 (CEST) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga102.jf.intel.com with ESMTP; 18 Sep 2015 07:59:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,553,1437462000"; d="scan'208";a="647571818" Received: from yliu-dev.sh.intel.com ([10.239.66.60]) by orsmga003.jf.intel.com with ESMTP; 18 Sep 2015 07:59:55 -0700 From: Yuanhan Liu To: dev@dpdk.org Date: Fri, 18 Sep 2015 23:01:07 +0800 Message-Id: <1442588473-13122-7-git-send-email-yuanhan.liu@linux.intel.com> X-Mailer: git-send-email 1.9.0 In-Reply-To: <1442588473-13122-1-git-send-email-yuanhan.liu@linux.intel.com> References: <1442588473-13122-1-git-send-email-yuanhan.liu@linux.intel.com> Cc: "Michael S. Tsirkin" , hangchun.ouyang@hotmail.com Subject: [dpdk-dev] [PATCH v5 06/12] vhost-user: handle VHOST_USER_RESET_OWNER correctly X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Sep 2015 14:59:59 -0000 Destroy corresponding device when a VHOST_USER_RESET_OWNER message is received, otherwise, the vhost-switch would still try to access vq of that device, which results to SIGSEG fault, and let vhost-switch crash in the end. Signed-off-by: Changchun Ouyang Signed-off-by: Yuanhan Liu --- lib/librte_vhost/vhost_user/vhost-net-user.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_vhost/vhost_user/vhost-net-user.c b/lib/librte_vhost/vhost_user/vhost-net-user.c index f681676..8fad385 100644 --- a/lib/librte_vhost/vhost_user/vhost-net-user.c +++ b/lib/librte_vhost/vhost_user/vhost-net-user.c @@ -380,7 +380,7 @@ vserver_message_handler(int connfd, void *dat, int *remove) ops->set_owner(ctx); break; case VHOST_USER_RESET_OWNER: - ops->reset_owner(ctx); + user_destroy_device(ctx); break; case VHOST_USER_SET_MEM_TABLE: -- 1.9.0