From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH] eal: fail eal when no hugepages were found Date: Sun, 29 Jan 2017 23:08:19 +0100 Message-ID: <114310386.7azNsuM9Yc@xps13> References: <20170124202202.31045-1-emmanuel.roullit@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, "Gonzalez Monroy, Sergio" To: Emmanuel Roullit Return-path: Received: from mail-wm0-f41.google.com (mail-wm0-f41.google.com [74.125.82.41]) by dpdk.org (Postfix) with ESMTP id EE469C304 for ; Sun, 29 Jan 2017 23:08:20 +0100 (CET) Received: by mail-wm0-f41.google.com with SMTP id c85so189924858wmi.1 for ; Sun, 29 Jan 2017 14:08:20 -0800 (PST) In-Reply-To: <20170124202202.31045-1-emmanuel.roullit@gmail.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" 2017-01-24 21:22, Emmanuel Roullit: > Found with clang static analysis: > lib/librte_eal/linuxapp/eal/eal_memory.c:1004:11: > warning: Call to 'malloc' has an allocation size of 0 bytes > tmp_hp = malloc(nr_hugepages * sizeof(struct hugepage_file)); > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > The --no-huge case, where nr_hugepages would be 0 > as well, is handled earlier. > > Fixes: 5e823a451261 ("ethdev: remove some VF functions") This commit reference seems wrong. Please check