From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id C22722C7A for ; Wed, 1 Jun 2016 07:50:47 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga104.fm.intel.com with ESMTP; 31 May 2016 22:50:47 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,399,1459839600"; d="scan'208";a="992758725" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga002.fm.intel.com with ESMTP; 31 May 2016 22:50:47 -0700 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 31 May 2016 22:50:45 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.150]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.193]) with mapi id 14.03.0248.002; Wed, 1 Jun 2016 13:50:26 +0800 From: "Xie, Huawei" To: Yuanhan Liu , Thomas Monjalon CC: "dev@dpdk.org" , "vincent.mc.li@gmail.com" Thread-Topic: [dpdk-dev] [PATCH] virtio: check if devargs is NULL before checking its value Thread-Index: AdG7yX7NpeXUMckVTR2xRbqyXgOdNA== Date: Wed, 1 Jun 2016 05:50:26 +0000 Message-ID: References: <1464100542-48126-1-git-send-email-huawei.xie@intel.com> <1740935.53DGeJ2mHm@xps13> <20160527020943.GZ5641@yliu-dev.sh.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] virtio: check if devargs is NULL before checking its value 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: Wed, 01 Jun 2016 05:50:48 -0000 On 5/27/2016 10:08 AM, Yuanhan Liu wrote:=0A= > On Wed, May 25, 2016 at 12:47:30PM +0200, Thomas Monjalon wrote:=0A= >>> - dev->devargs->type !=3D RTE_DEVTYPE_WHITELISTED_PCI) {=0A= >>> + (!dev->devargs ||=0A= >>> + dev->devargs->type !=3D RTE_DEVTYPE_WHITELISTED_PCI)) {=0A= >> Should the title be something like "fix crash ..."?=0A= >>=0A= >> I would also add=0A= >> Reported-by: Vincent Li =0A= > Huawei, the two are good comments (Thomas, thanks for the review, BTW :).= =0A= =0A= np.=0A= =0A= >=0A= > So, mind to send v2? BTW, I think this patch deserves some explanation,= =0A= > say, why dev->devargs could be NULL.=0A= >=0A= >=0A= >=0A= > --yliu=0A= >=0A= =0A=