From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by dpdk.org (Postfix) with ESMTP id 202992862 for ; Wed, 7 Nov 2018 00:08:22 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 98057221AF; Tue, 6 Nov 2018 18:08:21 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Tue, 06 Nov 2018 18:08:21 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=mesmtp; bh=ySxktWM5hbgY/ki54nsUsuTVdaFz8KTbnCQsrqhrCfc=; b=rlfRnWylTvEa Uv2/pM8/6CxGIJwEuXU2ztEF6RZpnQCidRZj9GV1RXTDKtRHS6Qs18IeY8ZXOrKN J+hR6H+VlKVJYzGYOEgCMLIGeswumunHg/vQcIGy8HLdHZLES1N/LErBVFnLA9KB PkxskCDd3BxtjsePkoxF4GRlkJxPlqo= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=ySxktWM5hbgY/ki54nsUsuTVdaFz8KTbnCQsrqhrC fc=; b=skjNrLbRIH3tGplQ+7JKC7avk9ObQTCt5kGQGZFEhIge3zLGLNSD7GZDc y6clNIuMdX0REnYYEt8L6JMCFDZEP47/E41inmyeWecum44roZBKhjHLMRvKPkKo fdsKyfYTezpjYBmWiLliM1v7R0k7wO/7T4Nl5D8WO13u67z0hKF/4lhbyd+lhMup 4tufULurkxvhPdKiLZCpacEwgZpzYMy6hc+9f0sbVkPXNvRAFDjnakb3MLKsJ1Qc GtV8ZA59ANyC4GpW0D9Ko2eTfeUEoOrFCKHsKb7WFxZnDSYLTsSe+9/NJ2q7fVFo u1qM3+qHxlP0VUcxPf+BdbCppxMLA== X-ME-Sender: X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 23476E476E; Tue, 6 Nov 2018 18:08:20 -0500 (EST) From: Thomas Monjalon To: Anatoly Burakov Cc: dev@dpdk.org, alejandro.lucero@netronome.com Date: Wed, 07 Nov 2018 00:08:18 +0100 Message-ID: <2772758.S30zqRuoYT@xps> In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH] mem: fix use after free in legacy mem init 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: Tue, 06 Nov 2018 23:08:22 -0000 06/11/2018 15:13, Anatoly Burakov: > Adding an additional failure path in DMA mask check has exposed an > issue where `hugepage` pointer may point to memory that has already > been unmapped, but pointer value is still not NULL, so failure > handler will attempt to unmap it second time if DMA mask check > fails. Fix it by setting `hugepage` pointer to NULL once it is no > longer needed. > > Coverity ID: 325730 > > Fixes: 165c89b84538 ("mem: use DMA mask check for legacy memory") > Cc: alejandro.lucero@netronome.com > > Signed-off-by: Anatoly Burakov Applied, thanks