From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 9F99CA0096 for ; Tue, 9 Apr 2019 03:54:23 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3A3D23572; Tue, 9 Apr 2019 03:54:23 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 3D48F3572; Tue, 9 Apr 2019 03:54:21 +0200 (CEST) X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Apr 2019 18:54:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,327,1549958400"; d="scan'208";a="314248749" Received: from dpdk-tbie.sh.intel.com ([10.67.104.173]) by orsmga005.jf.intel.com with ESMTP; 08 Apr 2019 18:54:18 -0700 Date: Tue, 9 Apr 2019 09:53:51 +0800 From: Tiwei Bie To: Bruce Richardson Cc: dev@dpdk.org, stable@dpdk.org, Maxime Coquelin , Zhihong Wang Message-ID: <20190409015351.GA26404@dpdk-tbie.sh.intel.com> References: <20190405134511.49066-1-bruce.richardson@intel.com> <20190408094640.46030-1-bruce.richardson@intel.com> <20190408094640.46030-3-bruce.richardson@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20190408094640.46030-3-bruce.richardson@intel.com> User-Agent: Mutt/1.9.4 (2018-02-28) Subject: Re: [dpdk-stable] [PATCH v3 2/5] examples/vhost_scsi: fix missing NULL-check for parameter X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" On Mon, Apr 08, 2019 at 10:46:37AM +0100, Bruce Richardson wrote: > Coverity points out that there is a check in the main thread loop for the > ctrlr->bdev being NULL, but by that stage the pointer has already been > dereferenced. Therefore, for safety, before we enter the loop do an > initial check on the parameter structure. > > Coverity issue: 158657 > Fixes: db75c7af19bb ("examples/vhost_scsi: introduce a new sample app") > CC: stable@dpdk.org > CC: Maxime Coquelin > CC: Tiwei Bie > CC: Zhihong Wang > > Signed-off-by: Bruce Richardson > --- > examples/vhost_scsi/vhost_scsi.c | 6 ++++++ > 1 file changed, 6 insertions(+) Reviewed-by: Tiwei Bie