From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 9A59258D4 for ; Tue, 5 Jul 2016 14:13:11 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga101.fm.intel.com with ESMTP; 05 Jul 2016 05:13:10 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,579,1459839600"; d="scan'208";a="729900232" Received: from yliu-dev.sh.intel.com (HELO yliu-dev) ([10.239.67.162]) by FMSMGA003.fm.intel.com with ESMTP; 05 Jul 2016 05:13:10 -0700 Date: Tue, 5 Jul 2016 20:14:35 +0800 From: Yuanhan Liu To: Jianfeng Tan Cc: dev@dpdk.org, huawei.xie@intel.com, michalx.k.jastrzebski@intel.com Message-ID: <20160705121435.GK26521@yliu-dev.sh.intel.com> References: <1467718979-20904-1-git-send-email-jianfeng.tan@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1467718979-20904-1-git-send-email-jianfeng.tan@intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [dpdk-dev] [PATCH] net/virtio: fix null pointer dereference 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: Tue, 05 Jul 2016 12:13:12 -0000 On Tue, Jul 05, 2016 at 11:42:59AM +0000, Jianfeng Tan wrote: > There is a logic bug in this code, that could lead to null pointer > dereference when cvq is NULL. Fix this problem by changing logic > _and_ to logic _or_. > > >> CID 127480: Null pointer dereferences (FORWARD_NULL) > >> Dereferencing null pointer "cvq". > if (!cvq && !cvq->vq) { > ... > } > > Coverity issue: 127480 > > Fixes: 01ad44fd374f ("net/virtio: split Rx/Tx queue") > > Signed-off-by: Jianfeng Tan Applied to dpdk-next-virtio. Thanks. --yliu