From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id B7E5A41D4F for ; Thu, 23 Feb 2023 10:40:49 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B42EC43150; Thu, 23 Feb 2023 10:40:49 +0100 (CET) Received: from mail-wr1-f43.google.com (mail-wr1-f43.google.com [209.85.221.43]) by mails.dpdk.org (Postfix) with ESMTP id DC97843158 for ; Thu, 23 Feb 2023 10:40:47 +0100 (CET) Received: by mail-wr1-f43.google.com with SMTP id j2so9961901wrh.9 for ; Thu, 23 Feb 2023 01:40:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=0uC8nFvL1pe82oPnMUWMRLY+8/ZcHqTqMz8uAR7KhFc=; b=Y62P7P7Qbab85JFC1OBfFAluhOuLxvVv0GU10R9D9KW15q23ZIpWbFJlJVc+9lKm7H +U7qsiEIhpiUC/yNqeybDsHUCXag77P+Btxt8FpBfGdCgk5vvD4k2FZ4F29H9l+FzIZu kEeUJGMu3lDVETdMKvxTdlt8M021EWpbR+YNTzOVlFmtlCnt5p7bHJAdsKQlptcopedQ 0ZOAkeh4/U/lN73PDb8p+Zhz1cZiQ27zttp6Y1Q6VGUKE1aD82dILf5aYMI9CdYo36bg /aOf5qQaM4vcYwWcvY+zYAjIMXTyoXlMAoBnFYidrW9epXqNjlPiwKrewjDQp4Nbyvqb Zwjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=0uC8nFvL1pe82oPnMUWMRLY+8/ZcHqTqMz8uAR7KhFc=; b=LgS6XPYfX7BQSBSrl/xos1JjFNEZO7/rp0Qp+2rR0sFbKDfLSKAsjf5HpLt2ECFA02 KobYUWXNIIFMk2kQMIPl0t4Vxicm8qT6r8abmtL1C2QJ34MNNn1h334Hw7jjy6Ho894j fG+sBPM6+vjzMT3LX0eS35LpAOT2a6ag/Oa+FeEtXy+HBbmd9kHRQnw0UlWHCuW40Qig xUNQYbOhX0/zEaBunZdI7D/+gdNg9Ct0p/ntAcKSjVILn5GH5AbCV8ofiHAJ1qnfIdV9 lBNTJYXv61Jm36rJLiY7v+28FKmJoRc419RGw0G+AiBlSW5JF2O7kMmMHNeJSVa8UeU/ TFgQ== X-Gm-Message-State: AO0yUKUCDgZaCT+WNO2fh0if+ZD5PnzTmz4kI1+bsmgDp2dO08UySTe3 lrqHmb0WtedZB46PU/GOwgc= X-Google-Smtp-Source: AK7set+6/zDsxtHd5oNSrrJMFLaO7VtpGMK74+JKe0jDesLyFpIhqlOxd/cN1mMZTj9Vt8pf1/4MuA== X-Received: by 2002:adf:f5ce:0:b0:2c5:5351:917e with SMTP id k14-20020adff5ce000000b002c55351917emr10666780wrp.50.1677145247501; Thu, 23 Feb 2023 01:40:47 -0800 (PST) Received: from localhost ([137.220.119.58]) by smtp.gmail.com with ESMTPSA id b15-20020a5d4b8f000000b002c561805a4csm11648819wrt.45.2023.02.23.01.40.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Feb 2023 01:40:47 -0800 (PST) From: luca.boccassi@gmail.com To: Volodymyr Fialko Cc: Stephen Hemminger , dpdk stable Subject: patch 'test/reorder: fix double free of drained buffers' has been queued to stable release 20.11.8 Date: Thu, 23 Feb 2023 09:37:11 +0000 Message-Id: <20230223093715.3926893-67-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230223093715.3926893-1-luca.boccassi@gmail.com> References: <20230223093715.3926893-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 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 Hi, FYI, your patch has been queued to stable release 20.11.8 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 02/25/23. 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 rebasing (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/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/5109a26c9ff22053f3cae64cec69c7a6e0f4aa7b Thanks. Luca Boccassi --- >From 5109a26c9ff22053f3cae64cec69c7a6e0f4aa7b Mon Sep 17 00:00:00 2001 From: Volodymyr Fialko Date: Sat, 7 Jan 2023 16:19:39 +0100 Subject: [PATCH] test/reorder: fix double free of drained buffers [ upstream commit d51955ea93fba1873e9c2b86a911e114787bdd4d ] Set to zero array of drained buffers after free, to prevent freeing them one more time. Discovered with enabled `RTE_LIBRTE_MEMPOOL_DEBUG`. Fixes: ecd867faa860 ("test/reorder: fix freeing mbuf twice") Signed-off-by: Volodymyr Fialko Acked-by: Stephen Hemminger --- app/test/test_reorder.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/test/test_reorder.c b/app/test/test_reorder.c index 1c4226da65..69b63bceba 100644 --- a/app/test/test_reorder.c +++ b/app/test/test_reorder.c @@ -270,6 +270,7 @@ test_reorder_drain(void) } if (robufs[0] != NULL) rte_pktmbuf_free(robufs[0]); + memset(robufs, 0, sizeof(robufs)); /* Insert more packets * RB[] = {NULL, NULL, NULL, NULL} @@ -306,6 +307,7 @@ test_reorder_drain(void) if (robufs[i] != NULL) rte_pktmbuf_free(robufs[i]); } + memset(robufs, 0, sizeof(robufs)); /* * RB[] = {NULL, NULL, NULL, NULL} -- 2.39.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-02-23 09:36:30.976002904 +0000 +++ 0067-test-reorder-fix-double-free-of-drained-buffers.patch 2023-02-23 09:36:28.350172224 +0000 @@ -1 +1 @@ -From d51955ea93fba1873e9c2b86a911e114787bdd4d Mon Sep 17 00:00:00 2001 +From 5109a26c9ff22053f3cae64cec69c7a6e0f4aa7b Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit d51955ea93fba1873e9c2b86a911e114787bdd4d ] + @@ -11 +12,0 @@ -Cc: stable@dpdk.org @@ -20 +21 @@ -index f0714a5c18..7b5e590bac 100644 +index 1c4226da65..69b63bceba 100644 @@ -23,2 +24 @@ -@@ -278,6 +278,7 @@ test_reorder_drain(void) - goto exit; +@@ -270,6 +270,7 @@ test_reorder_drain(void) @@ -26 +26,2 @@ - rte_pktmbuf_free(robufs[0]); + if (robufs[0] != NULL) + rte_pktmbuf_free(robufs[0]); @@ -31,3 +32,3 @@ -@@ -313,6 +314,7 @@ test_reorder_drain(void) - for (i = 0; i < 3; i++) { - rte_pktmbuf_free(robufs[i]); +@@ -306,6 +307,7 @@ test_reorder_drain(void) + if (robufs[i] != NULL) + rte_pktmbuf_free(robufs[i]);