From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH] memalloc: fix potential underflow on mem size calculation Date: Mon, 14 May 2018 02:14:10 +0200 Message-ID: <2775327.cO7WP6cxJY@xps> References: <6b44bd0289f777e181eb4007005ad3b466beafde.1525352308.git.anatoly.burakov@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org To: Anatoly Burakov Return-path: Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by dpdk.org (Postfix) with ESMTP id 1C4941BD9D for ; Mon, 14 May 2018 02:14:13 +0200 (CEST) In-Reply-To: <6b44bd0289f777e181eb4007005ad3b466beafde.1525352308.git.anatoly.burakov@intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 03/05/2018 15:03, Anatoly Burakov: > If total memory is already bigger than max memory, an underflow > will occur on subtraction. Fix it by simply stopping whenever > we already have amount of memory that is bigger than maximum. > > Fixes: 66cc45e293ed ("mem: replace memseg with memseg lists") > Cc: anatoly.burakov@intel.com > > Signed-off-by: Anatoly Burakov Applied, thanks