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 BBCD8A04F5 for ; Wed, 11 Dec 2019 22:28:43 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id AE3C51D9E; Wed, 11 Dec 2019 22:28:43 +0100 (CET) Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) by dpdk.org (Postfix) with ESMTP id 9F5B91BE80 for ; Wed, 11 Dec 2019 22:28:40 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576099717; 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=x65hz6tKi1Gi0wASBWUKLfOwE5U1CD7+zqZ2zh1EQ3c=; b=i6gy8031H085XjdVP53zBKwhp5w0t3JqYYemTEyVPSGLso3AsGO5RwZHvE6FgSm1DzrKnO FRdYS5y9J3Dnda0MCfTHxS+d0ZtJ2yPScWyCLCMp5Ukz/QGf6UtEYZe9hiArPpShdwupUK X7FdNBGkNz17bq6LiLrVEwlzjVTkw0o= 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-337-DQPec974Mv-ODytL9GiZmg-1; Wed, 11 Dec 2019 16:28:34 -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 49D22800D41; Wed, 11 Dec 2019 21:28:33 +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 2CCCC10013A1; Wed, 11 Dec 2019 21:28:32 +0000 (UTC) From: Kevin Traynor To: Xueming Li Cc: Anatoly Burakov , dpdk stable Date: Wed, 11 Dec 2019 21:26:26 +0000 Message-Id: <20191211212702.27851-34-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: DQPec974Mv-ODytL9GiZmg-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Subject: [dpdk-stable] patch 'malloc: fix realloc padded element size' 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/8b828c9a108cd89462= 0aeb6b9ea6041cafbcc2cb Thanks. Kevin. --- >From 8b828c9a108cd894620aeb6b9ea6041cafbcc2cb Mon Sep 17 00:00:00 2001 From: Xueming Li Date: Tue, 12 Nov 2019 14:50:28 +0000 Subject: [PATCH] malloc: fix realloc padded element size [ upstream commit 90f538b8630b2782460aae46f346ddb4fc102011 ] When resize a memory with next element, the original element size grows. If the orginal element has padding, the real inner element size didn't grow as well and this causes trailer verification failure when malloc debug enabled. Fixes: af75078fece3 ("first public release") Signed-off-by: Xueming Li Reviewed-by: Anatoly Burakov --- lib/librte_eal/common/malloc_elem.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/librte_eal/common/malloc_elem.c b/lib/librte_eal/common/ma= lloc_elem.c index 052aeeb7b..c92dc0ab6 100644 --- a/lib/librte_eal/common/malloc_elem.c +++ b/lib/librte_eal/common/malloc_elem.c @@ -293,4 +293,9 @@ split_elem(struct malloc_elem *elem, struct malloc_elem= *split_pt) =09elem->size =3D old_elem_size; =09set_trailer(elem); +=09if (elem->pad) { +=09=09/* Update inner padding inner element size. */ +=09=09elem =3D RTE_PTR_ADD(elem, elem->pad); +=09=09elem->size =3D old_elem_size - elem->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:15.411481735 +0000 +++ 0034-malloc-fix-realloc-padded-element-size.patch=092019-12-11 21:24:12= .667651217 +0000 @@ -1 +1 @@ -From 90f538b8630b2782460aae46f346ddb4fc102011 Mon Sep 17 00:00:00 2001 +From 8b828c9a108cd894620aeb6b9ea6041cafbcc2cb Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 90f538b8630b2782460aae46f346ddb4fc102011 ] + @@ -12 +13,0 @@ -Cc: stable@dpdk.org @@ -21 +22 @@ -index 658c9b5b7..afacb1813 100644 +index 052aeeb7b..c92dc0ab6 100644 @@ -24 +25 @@ -@@ -308,4 +308,9 @@ split_elem(struct malloc_elem *elem, struct malloc_ele= m *split_pt) +@@ -293,4 +293,9 @@ split_elem(struct malloc_elem *elem, struct malloc_ele= m *split_pt)