From mboxrd@z Thu Jan 1 00:00:00 1970 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) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 956A225D8C; Sun, 13 May 2018 20:14:12 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Sun, 13 May 2018 20:14:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=mesmtp; bh=E4fYFTOWrmkBkHRN06v6/nx0YI BPV9my4EtlkdXImRM=; b=D7H4LB9Nelvf8PseLPfppAVkpdi+ClOiQ9HmHltffH l5EWR3PPcztxUe+owCdxKHQu/FSFNIn+49TYdBa+wvmLnuqRhk9S02xrS5v3NqrU TCRD8r+/ZcvdvGy23+5ZqhMrhRV4uYTg7Du0T4cn4oc2/PbYaLYpU39mYirMe7hP E= 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-sender:x-me-sender:x-sasl-enc; s=fm2; bh=E4fYFT OWrmkBkHRN06v6/nx0YIBPV9my4EtlkdXImRM=; b=LqsPzcYT+SWZoBpXXof0sG +rWwspNDrtI8421MoMylrlLyo7068Uo8Gx0zKdUOXANxYwfdJtvNdBk6BRHB/5Xj 1tMVW8ziNqtz0UMIttK4Y/fmamIj+ejpoQWE9jApyPNBsaxqyG/TPs0QlnLc/jek BVqlEAuwO/jC/8yoovqw69F0saCXZkWjDHtyhclM7GykQ0e9xgT0i8GUl2GR2AO9 PYEwNMAIO5g3n0G9eYcQ+K/i7Ojt1jaZQfHAuP0YuUIeZIxWtQMLBNZK8bg0Fa3e 7paeYqT7zMK2wT5I90WeZq7ggMsX6ZgDHn/23gs/CdAWo4R8+f5Por7Mfx56HTPA == X-ME-Sender: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 06D7AE47A1; Sun, 13 May 2018 20:14:11 -0400 (EDT) From: Thomas Monjalon To: Anatoly Burakov Cc: dev@dpdk.org Date: Mon, 14 May 2018 02:14:10 +0200 Message-ID: <2775327.cO7WP6cxJY@xps> In-Reply-To: <6b44bd0289f777e181eb4007005ad3b466beafde.1525352308.git.anatoly.burakov@intel.com> References: <6b44bd0289f777e181eb4007005ad3b466beafde.1525352308.git.anatoly.burakov@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH] memalloc: fix potential underflow on mem size calculation 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, 14 May 2018 00:14:13 -0000 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