From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by dpdk.org (Postfix) with ESMTP id 496934CA9 for ; Mon, 22 Oct 2018 12:47:36 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id E4C3322079; Mon, 22 Oct 2018 06:47:35 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Mon, 22 Oct 2018 06:47:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=mesmtp; bh=DxvWKlB+2K4yKNO1mYJrsT5HpbyBDbBSPAc3sATGux4=; b=blqpWH46Vhu1 jOEjBy1my3nFsxCko7eIe/1wh0ilX44FCtxUn5+6+nzKQbe1I2wkY5TZcSdhzAuz TQPwWBCf5kYD3ZOTqNWxIEltrVVRsFMgw3MWpE86p3tBhrLNM/QyYcDlzkzwtw4t 1MgtiktEkaRWnmvCcZa+WfwoKLb36Sk= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=DxvWKlB+2K4yKNO1mYJrsT5HpbyBDbBSPAc3sATGu x4=; b=rc5xOVhGHDA3TqvQSSl7h/0WvA7Ftwt4wfJp5T66k3MR2BeupE4w30jeu ltYKZ/u1v/S9C8OePkLRaVpj2RVFE+MvSB2CFd8UQ+AsJ02TZWNGDhwD9OffOOsg OkiRpvh9VxINl82duBBnGdjeWEFrTC4mj1WsMb+obc0p/Wpp9+B6cd800H5HwPDI oQTiGguoQhMzR5JjGeMxJ4AX7WSpvO2jNf5S+4gC7+EXya8HjT34MmwAhlf/2qCr +eIgOdAwGkvEi93n1th/oUWdm2BCy8AQ0iVNjhA1ftTbSt6H9Teo+1Z35rZh6tJ6 5D30Gma8Gw4OEl8uCoPTJCml2hmGA== X-ME-Sender: X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id F3E58102DD; Mon, 22 Oct 2018 06:47:34 -0400 (EDT) From: Thomas Monjalon To: Qi Zhang Cc: dev@dpdk.org Date: Mon, 22 Oct 2018 12:47:36 +0200 Message-ID: <3540454.BVlvfsRZ1j@xps> In-Reply-To: <1754125.JGkyPi735h@xps> References: <20181022061516.45912-1-qi.z.zhang@intel.com> <1754125.JGkyPi735h@xps> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH] eal: fix NULL device argument pointer reference X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Oct 2018 10:47:36 -0000 22/10/2018 09:30, Thomas Monjalon: > 22/10/2018 08:15, Qi Zhang: > > dev->devargs is not initialized for PCI device, so use dev->bus to > > replace dev->devargs->bus to avoid segment fault when hotplug remove > > a PCI device. > > It is not really specific to PCI device. > The devargs is not initialized if the device is probed by default policy > (i.e. not in blacklist). > > I think we can say that "devargs is not always initialized". > > > Fixes: 244d5130719c ("eal: enable hotplug on multi-process") > > > > Signed-off-by: Qi Zhang Applied with following text: eal: fix bus name read for removal in multi-process A crash may appear when removing some PCI devices because dev->devargs is not always initialized. So use dev->bus instead of dev->devargs->bus when building devargs string to remove a device.