From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 1B3AF2BD6 for ; Fri, 27 May 2016 04:07:46 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga103.jf.intel.com with ESMTP; 26 May 2016 19:07:46 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,371,1459839600"; d="scan'208";a="709587070" Received: from yliu-dev.sh.intel.com (HELO yliu-dev) ([10.239.67.162]) by FMSMGA003.fm.intel.com with ESMTP; 26 May 2016 19:07:45 -0700 Date: Fri, 27 May 2016 10:09:43 +0800 From: Yuanhan Liu To: Thomas Monjalon Cc: Huawei Xie , dev@dpdk.org, vincent.mc.li@gmail.com Message-ID: <20160527020943.GZ5641@yliu-dev.sh.intel.com> References: <1464100542-48126-1-git-send-email-huawei.xie@intel.com> <1740935.53DGeJ2mHm@xps13> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1740935.53DGeJ2mHm@xps13> User-Agent: Mutt/1.5.23 (2014-03-12) 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: Fri, 27 May 2016 02:07:47 -0000 On Wed, May 25, 2016 at 12:47:30PM +0200, Thomas Monjalon wrote: > > - dev->devargs->type != RTE_DEVTYPE_WHITELISTED_PCI) { > > + (!dev->devargs || > > + dev->devargs->type != RTE_DEVTYPE_WHITELISTED_PCI)) { > > Should the title be something like "fix crash ..."? > > I would also add > Reported-by: Vincent Li Huawei, the two are good comments (Thomas, thanks for the review, BTW :). So, mind to send v2? BTW, I think this patch deserves some explanation, say, why dev->devargs could be NULL. --yliu