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 1820523B for ; Mon, 30 Apr 2018 11:00:14 +0200 (CEST) X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Apr 2018 02:00:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,346,1520924400"; d="scan'208";a="37209610" Received: from bricha3-mobl.ger.corp.intel.com ([10.237.221.51]) by orsmga007.jf.intel.com with SMTP; 30 Apr 2018 02:00:10 -0700 Received: by (sSMTP sendmail emulation); Mon, 30 Apr 2018 10:00:09 +0100 Date: Mon, 30 Apr 2018 10:00:09 +0100 From: Bruce Richardson To: Anatoly Burakov Cc: dev@dpdk.org, thomas@monjalon.net Message-ID: <20180430090008.GB87372@bricha3-MOBL.ger.corp.intel.com> References: <6aaf607fae1ee7c5c80000891d63f6b7992ab33b.1524848343.git.anatoly.burakov@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6aaf607fae1ee7c5c80000891d63f6b7992ab33b.1524848343.git.anatoly.burakov@intel.com> Organization: Intel Research and Development Ireland Ltd. User-Agent: Mutt/1.9.4 (2018-02-28) Subject: Re: [dpdk-dev] [PATCH v4 3/9] mem: fix potential double close X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Apr 2018 09:00:15 -0000 On Fri, Apr 27, 2018 at 06:07:04PM +0100, Anatoly Burakov wrote: > We were closing descriptor before checking if mapping has > failed, but if it did, we did a second close afterwards. Fix > it by moving closing descriptor to after we've done all error > checks. > > Coverity issue: 272560 > > Fixes: 2a04139f66b4 ("eal: add single file segments option") > Cc: anatoly.burakov@intel.com > > Signed-off-by: Anatoly Burakov > --- > > Notes: > v4: > - Moved fd close to until after all error checks are done > Acked-by: Bruce Richardson