From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 6B14B2B82 for ; Thu, 3 May 2018 12:11:30 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.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="52053030" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by fmsmga001.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 w43ABR8p021984; 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 w43ABRLf025736; Thu, 3 May 2018 11:11:27 +0100 Received: (from aburakov@localhost) by sivswdev01.ir.intel.com with LOCAL id w43ABRY3025732; 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:25 +0100 Message-Id: <556d606e3af8ab32e920611d166a0154e472fe25.1525342009.git.anatoly.burakov@intel.com> X-Mailer: git-send-email 1.7.0.7 Subject: [dpdk-dev] [PATCH 1/3] mem: fix index for unmapping segments on failure 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 Segment index was calculated incorrectly, causing free_seg to attempt to free segments that do not exist. 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 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/librte_eal/linuxapp/eal/eal_memalloc.c b/lib/librte_eal/linuxapp/eal/eal_memalloc.c index 360d8f7..c441c89 100644 --- a/lib/librte_eal/linuxapp/eal/eal_memalloc.c +++ b/lib/librte_eal/linuxapp/eal/eal_memalloc.c @@ -735,8 +735,7 @@ alloc_seg_walk(const struct rte_memseg_list *msl, void *arg) &cur_msl->memseg_arr; tmp = rte_fbarray_get(arr, j); - if (free_seg(tmp, wa->hi, msl_idx, - start_idx + j)) { + if (free_seg(tmp, wa->hi, msl_idx, j)) { RTE_LOG(ERR, EAL, "Cannot free page\n"); continue; } -- 2.7.4