From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yuanhan Liu Subject: Re: [PATCH] virtio: check if devargs is NULL before checking its value Date: Fri, 27 May 2016 10:09:43 +0800 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 Cc: Huawei Xie , dev@dpdk.org, vincent.mc.li@gmail.com To: Thomas Monjalon 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) Content-Disposition: inline In-Reply-To: <1740935.53DGeJ2mHm@xps13> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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