From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Liu, Yong" Subject: Re: [PATCH 1/3] mem: fix index for unmapping segments on failure Date: Fri, 4 May 2018 08:13:01 +0000 Message-ID: <86228AFD5BCD8E4EBFD2B90117B5E81E630330EC@SHSMSX103.ccr.corp.intel.com> References: <556d606e3af8ab32e920611d166a0154e472fe25.1525342009.git.anatoly.burakov@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable To: "Burakov, Anatoly" , "dev@dpdk.org" Return-path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 5E686DD2 for ; Fri, 4 May 2018 10:13:05 +0200 (CEST) In-Reply-To: <556d606e3af8ab32e920611d166a0154e472fe25.1525342009.git.anatoly.burakov@intel.com> Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Tested-by: Marvin Liu > -----Original Message----- > From: Burakov, Anatoly > Sent: Thursday, May 03, 2018 6:11 PM > To: dev@dpdk.org > Cc: Liu, Yong ; Burakov, Anatoly > > Subject: [PATCH 1/3] mem: fix index for unmapping segments on failure >=20 > Segment index was calculated incorrectly, causing free_seg to > attempt to free segments that do not exist. >=20 > Fixes: a5ff05d60fc5 ("mem: support unmapping pages at runtime") > Cc: anatoly.burakov@intel.com >=20 > Signed-off-by: Anatoly Burakov > --- > lib/librte_eal/linuxapp/eal/eal_memalloc.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) >=20 > 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, voi= d > *arg) > &cur_msl->memseg_arr; >=20 > tmp =3D 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