From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH] mem: fix use after free in legacy mem init Date: Wed, 07 Nov 2018 00:08:18 +0100 Message-ID: <2772758.S30zqRuoYT@xps> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, alejandro.lucero@netronome.com To: Anatoly Burakov 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) In-Reply-To: List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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