From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 47B012A66 for ; Thu, 3 May 2018 12:11:29 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 May 2018 03:11:28 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,358,1520924400"; d="scan'208";a="42740605" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by fmsmga002.fm.intel.com with ESMTP; 03 May 2018 03:11:27 -0700 Received: from sivswdev01.ir.intel.com (sivswdev01.ir.intel.com [10.237.217.45]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id w43ABRcf021987; Thu, 3 May 2018 11:11:27 +0100 Received: from sivswdev01.ir.intel.com (localhost [127.0.0.1]) by sivswdev01.ir.intel.com with ESMTP id w43ABRwE025743; Thu, 3 May 2018 11:11:27 +0100 Received: (from aburakov@localhost) by sivswdev01.ir.intel.com with LOCAL id w43ABRJ5025739; Thu, 3 May 2018 11:11:27 +0100 From: Anatoly Burakov To: dev@dpdk.org Cc: yong.liu@intel.com, anatoly.burakov@intel.com Date: Thu, 3 May 2018 11:11:26 +0100 Message-Id: X-Mailer: git-send-email 1.7.0.7 In-Reply-To: <556d606e3af8ab32e920611d166a0154e472fe25.1525342009.git.anatoly.burakov@intel.com> References: <556d606e3af8ab32e920611d166a0154e472fe25.1525342009.git.anatoly.burakov@intel.com> In-Reply-To: <556d606e3af8ab32e920611d166a0154e472fe25.1525342009.git.anatoly.burakov@intel.com> References: <556d606e3af8ab32e920611d166a0154e472fe25.1525342009.git.anatoly.burakov@intel.com> Subject: [dpdk-dev] [PATCH 2/3] memalloc: fix wrong return value on freeing segment on fail 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: Thu, 03 May 2018 10:11:30 -0000 Return value should be zero for success, but if unlock and unlink have succeeded, return value was 1, which triggered failure message in calling code. Fixes: a5ff05d60fc5 ("mem: support unmapping pages at runtime") Cc: anatoly.burakov@intel.com Signed-off-by: Anatoly Burakov --- lib/librte_eal/linuxapp/eal/eal_memalloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_eal/linuxapp/eal/eal_memalloc.c b/lib/librte_eal/linuxapp/eal/eal_memalloc.c index c441c89..3282293 100644 --- a/lib/librte_eal/linuxapp/eal/eal_memalloc.c +++ b/lib/librte_eal/linuxapp/eal/eal_memalloc.c @@ -647,7 +647,7 @@ free_seg(struct rte_memseg *ms, struct hugepage_info *hi, memset(ms, 0, sizeof(*ms)); - return ret; + return ret < 0 ? -1 : 0; } struct alloc_walk_param { -- 2.7.4