From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id A2596A04F5 for ; Wed, 11 Dec 2019 22:29:13 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7D4BB1BECF; Wed, 11 Dec 2019 22:29:13 +0100 (CET) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by dpdk.org (Postfix) with ESMTP id F15631B994 for ; Wed, 11 Dec 2019 22:29:11 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576099751; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1T+eokhg+OkfUXfvHjH/rGst2nBDKHECoHfD8Y06e8A=; b=FwuLaYaJ4hInWrC4uR32Jv7s9pIJgfMNDZFHDOPC1aQcrKX/RJBfQI3keu+prIuECdXjKB PeJbxjB16TMck/yp378H1wD2IrY+CTQpUlSVBXRNU8ph9RBIkm6hsaOVwRJr/p6CXW5m9n oOO+IA06w8YX8pI4zzc7fRpCuG47VSg= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-178-oboIgcnXNey4WR0ufynxdg-1; Wed, 11 Dec 2019 16:29:10 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 130AD18543A0; Wed, 11 Dec 2019 21:29:09 +0000 (UTC) Received: from rh.redhat.com (ovpn-116-64.ams2.redhat.com [10.36.116.64]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2F51A10013A1; Wed, 11 Dec 2019 21:29:08 +0000 (UTC) From: Kevin Traynor To: Xueming Li Cc: Anatoly Burakov , dpdk stable Date: Wed, 11 Dec 2019 21:26:50 +0000 Message-Id: <20191211212702.27851-58-ktraynor@redhat.com> In-Reply-To: <20191211212702.27851-1-ktraynor@redhat.com> References: <20191211212702.27851-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-MC-Unique: oboIgcnXNey4WR0ufynxdg-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Subject: [dpdk-stable] patch 'malloc: fix memory element size in case of padding' has been queued to LTS release 18.11.6 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to LTS release 18.11.6 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 12/17/19. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasi= ng (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable-queue This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable-queue/commit/9fd62944eacc0ea34d= 7b60300f9e891c4a6f7359 Thanks. Kevin. --- >From 9fd62944eacc0ea34d7b60300f9e891c4a6f7359 Mon Sep 17 00:00:00 2001 From: Xueming Li Date: Thu, 21 Nov 2019 14:25:02 +0000 Subject: [PATCH] malloc: fix memory element size in case of padding [ upstream commit 2808a12cc05375e986ee1c9bb956bad8288c2b5a ] This patch fixes wrong inner memory element size when joining two elements. Fixes: af75078fece3 ("first public release") Signed-off-by: Xueming Li Reviewed-by: Anatoly Burakov --- lib/librte_eal/common/malloc_elem.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/librte_eal/common/malloc_elem.c b/lib/librte_eal/common/ma= lloc_elem.c index c92dc0ab6..24e1eb55f 100644 --- a/lib/librte_eal/common/malloc_elem.c +++ b/lib/librte_eal/common/malloc_elem.c @@ -469,4 +469,8 @@ join_elem(struct malloc_elem *elem1, struct malloc_elem= *elem2) =09=09elem1->heap->last =3D elem1; =09elem1->next =3D next; +=09if (elem1->pad) { +=09=09struct malloc_elem *inner =3D RTE_PTR_ADD(elem1, elem1->pad); +=09=09inner->size =3D elem1->size - elem1->pad; +=09} } =20 --=20 2.21.0 --- Diff of the applied patch vs upstream commit (please double-check if non-= empty: --- --- -=092019-12-11 21:24:17.261086342 +0000 +++ 0058-malloc-fix-memory-element-size-in-case-of-padding.patch=092019-12-= 11 21:24:12.722650081 +0000 @@ -1 +1 @@ -From 2808a12cc05375e986ee1c9bb956bad8288c2b5a Mon Sep 17 00:00:00 2001 +From 9fd62944eacc0ea34d7b60300f9e891c4a6f7359 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 2808a12cc05375e986ee1c9bb956bad8288c2b5a ] + @@ -10 +11,0 @@ -Cc: stable@dpdk.org @@ -19 +20 @@ -index afacb1813..885d00424 100644 +index c92dc0ab6..24e1eb55f 100644 @@ -22 +23 @@ -@@ -488,4 +488,8 @@ join_elem(struct malloc_elem *elem1, struct malloc_ele= m *elem2) +@@ -469,4 +469,8 @@ join_elem(struct malloc_elem *elem1, struct malloc_ele= m *elem2)