From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Tan, Jianfeng" Subject: Re: [PATCH] net/vhost: fix segfault when creating vdev dynamically Date: Tue, 27 Mar 2018 17:10:57 +0800 Message-ID: <20388d18-796f-7dd5-e596-f8cc290063d0@intel.com> References: <1522166726-42025-1-git-send-email-junjie.j.chen@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: "dev@dpdk.org" To: "Chen, Junjie J" , "maxime.coquelin@redhat.com" , "mtetsuyah@gmail.com" Return-path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 57B9D4CBB for ; Tue, 27 Mar 2018 11:11:00 +0200 (CEST) In-Reply-To: List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 3/27/2018 5:02 PM, Chen, Junjie J wrote: > Hi Jianfeng > >> On 3/28/2018 12:05 AM, Junjie Chen wrote: >>> when creating vdev dynamically, vhost pmd driver start directly >>> without checking TX/RX queues ready or not, and thus cause >>> segmentation fault when vhost library accessing queues. This patch add >>> flag to check whether queues setup or not, and add driver start call >>> into dev_start to allow user start it after setting up queue. >> The issue is clear now. But this patch just puts the situation before below fix: >> "it doesn't create the actual datagram socket until you call .dev_start()." > No, if the queue exist, the datagram socket still get created in vhost_create API, since the vhost_driver_register still exist in vhost_create. The queue can never be created, as it's still not probed.