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 4DECAA034F for ; Wed, 10 Nov 2021 07:37:40 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4755940683; Wed, 10 Nov 2021 07:37:40 +0100 (CET) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2042.outbound.protection.outlook.com [40.107.93.42]) by mails.dpdk.org (Postfix) with ESMTP id 8284740142 for ; Wed, 10 Nov 2021 07:37:38 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=P4THBHVkdaPajvscfly+qLAa+TycNQwMgZ2dIq0q5vCM29JYs1HoQp6r+Pt7XUIL0gq+aXXKj+/os6aciWgkbA25zIWr2i0g+anhf3LkXiPL0gHqeArzXB4b/kg6BzrFGCDAnCSWGG3//M5oogkozLQ2TexXhR1UW8iySAO/OZcnXYsYHFt24fYuZhBj+0tgQwoWy3CaDFixuQST2NaFp5vDxQUbqoGEOJ4pigJnsmXilAdsQCpwkMiFwgvza9O4KFWM0pSQh31yUBhVMVksGY73xrm6rPiNf7H8VBC2v1qm7m6LDLTnRoLP6nGLRQu8leGz43ls6MbfXkr3uR+vXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=nZ+QdM1UWHC7Xjo0B2sq0KpnWqL0eNyy2bAStRIU2s4=; b=iELEsF19Q1JqN4C2hXxOQRDJp4iZXFTmir1G2CUxpVhutqJpHkTwvmcNB81cO8/GRbaiHqSnWfjRkuavpAtbVXHCdEVb1yUh0gqD6kFRrwvdR8kF8sMGJeHjBdW1Glxgqu8lUY0Z6nNscT/RxZ0EIo5q7B9zrWB1PyOpJ7L4Jysfb1hiPoCqOKzxHkILpNCc2eVvqYTsGqi8nY7XR+f1516Or2WkBlAMVE3hBEzai3TEdM5JJRVBi4ohINail92DDcvisSmjoYEPXGy01JewaeQSgN7yrZM04YXZXvn6b58NdjvZwmcu/H4ICX3Q34ErYSeNyyAej29NsNCl4rVHsQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=intel.com smtp.mailfrom=nvidia.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=nZ+QdM1UWHC7Xjo0B2sq0KpnWqL0eNyy2bAStRIU2s4=; b=HY//O3GfK3WUKmIsHDg9wFVLhEaEIOMFLtyZK/dxhc1bdOw0nVOp8nNxcHvaloXoPlfeuKuZnpSd3EJZ99vus/T1heKUMhffsseHXFg1r9zrXq2ODmb6fgnN+w6Jr/eqk2vUOAmNj3HsrAb9F1+hPsjL6zrJ+BYIArtkcDZVBlnSNVxmWZJRe0lewAlTioNU3sxQn6+EghcwWeX8rSZbBTFMpRl0dcdgPlt9FWXCN5FSVvZB0OZL6+Vv6A0GEpavZloUMeiWmBOHUnqd9MqH1sgAK+JmrSIdxaZ7EfYpOng50meE1pblUApy0i0VNmLqHiAsYy1iPV1T69/5jZqp1g== Received: from DS7PR03CA0140.namprd03.prod.outlook.com (2603:10b6:5:3b4::25) by BYAPR12MB3446.namprd12.prod.outlook.com (2603:10b6:a03:d7::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.11; Wed, 10 Nov 2021 06:37:36 +0000 Received: from DM6NAM11FT041.eop-nam11.prod.protection.outlook.com (2603:10b6:5:3b4:cafe::e) by DS7PR03CA0140.outlook.office365.com (2603:10b6:5:3b4::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.10 via Frontend Transport; Wed, 10 Nov 2021 06:37:36 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.112.34 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.34; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.34) by DM6NAM11FT041.mail.protection.outlook.com (10.13.172.98) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4690.15 via Frontend Transport; Wed, 10 Nov 2021 06:37:36 +0000 Received: from nvidia.com (172.20.187.5) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Wed, 10 Nov 2021 06:37:32 +0000 From: Xueming Li To: Conor Walsh CC: Luca Boccassi , Zhihong Peng , Conor Fogarty , Bruce Richardson , dpdk stable Date: Wed, 10 Nov 2021 14:28:50 +0800 Message-ID: <20211110063216.2744012-47-xuemingl@nvidia.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211110063216.2744012-1-xuemingl@nvidia.com> References: <20211110063216.2744012-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.187.5] X-ClientProxiedBy: HQMAIL101.nvidia.com (172.20.187.10) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b2aa8078-2117-414e-d69e-08d9a4149559 X-MS-TrafficTypeDiagnostic: BYAPR12MB3446: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:9508; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ZKFLLmwYT9f0Ldtzu6sJxv7OPPa0EALBMCFYjKYN5pnfv97oQIaxKI9mbS84wjxiSucGkEK8m0ySe7vZc0v3STo4npnU342M6T+tCRgmrXyAgc6yR8RxIRokJnXmlrTFDZ6EQMzbv5fbBxJB353ThcsrK+r7jJLFA8Bw86dzDYB1YEireaaUfxYG+b5EuOcFN5BNcPdlYD47GnIBGPeP+SB3j2tH8tlDa6frKkXpxiwKVqlNVQAijDRMPca/IN3Whs3Ak88AX8hwXXDvafu1gcR/IKwM1HPk/zIGqOHl4eaT5YKC1YZ0f/WKR58fYE0sfli3PpXNb2KzGHksOJuFbQyrC0bxnRlQTlGihTJxeLg98F5umudGTEOy46uqIQJROslngYI3HdLPe/xgiBJkhGNIcyZ2WZJFxQu87AV1vIJfRH1OLLBkG04dlEsZXx3aUgxb48J4YqkG/lEa5F0/GkWXn92ts4pq5N2yrciE38fAVQ6m1oUWAPapP+/JqK1In00HP33wxVNS6ibvGfn3qasYe+z3/J5MiT5LIYVm5DRCXeOzE4XSJ99q7gbHeayzbJqkgWPgtgUDfsjKGeDuYSrIggcMLxrghL6ePjEeQHACvMVQlfAEMhBcyuThi2cq1TZuUHqU0jzrkRLJthEG1ZScmRdasW2KRGr8465o9qIk/3dC/0XWXMrCniC0Sp9s8Et3bwp7xijAPV0Gmb0vbS4Zv7Uom3ePljrzl9cV7oavjqXjQMcgYMcBDMgG73/EH02oxbvcKrZcyoNKB7xfgSV3lLumO1Cd7D7EH83eT7BGcwMdBu0L8Vd1xFmRFwqqSu82TC+nA/rsZXHe2OCQdg== X-Forefront-Antispam-Report: CIP:216.228.112.34; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:schybrid03.nvidia.com; CAT:NONE; SFS:(4636009)(46966006)(36840700001)(8676002)(7636003)(426003)(6666004)(316002)(36860700001)(966005)(8936002)(1076003)(6286002)(508600001)(82310400003)(4326008)(53546011)(356005)(70206006)(2616005)(26005)(186003)(83380400001)(336012)(54906003)(6916009)(47076005)(55016002)(4001150100001)(5660300002)(86362001)(16526019)(7696005)(70586007)(2906002)(36756003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Nov 2021 06:37:36.0450 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b2aa8078-2117-414e-d69e-08d9a4149559 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.112.34]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT041.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR12MB3446 Subject: [dpdk-stable] patch 'eal: fix memory leak when saving arguments' has been queued to stable release 20.11.4 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 Sender: "stable" Hi, FYI, your patch has been queued to stable release 20.11.4 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk This queued commit can be viewed at: https://github.com/steevenlee/dpdk/commit/fcece17c517b90e30826955e4a6f6f54df2c0e90 Thanks. Xueming Li --- >From fcece17c517b90e30826955e4a6f6f54df2c0e90 Mon Sep 17 00:00:00 2001 From: Conor Walsh Date: Wed, 1 Sep 2021 09:38:47 +0000 Subject: [PATCH] eal: fix memory leak when saving arguments Cc: Xueming Li [ upstream commit 4777674c4428f528fa2890d8afab551f6dd54c24 ] This patch fixes a memleak which was reported in Bugzilla within the eal_save_args function. This was caused by the function mistakenly adding -- to the eal args instead of breaking beforehand. Bugzilla ID: 722 Fixes: 293c53d8b23c ("eal: add telemetry callbacks") Reported-by: Zhihong Peng Signed-off-by: Conor Walsh Signed-off-by: Conor Fogarty Acked-by: Bruce Richardson --- lib/librte_eal/common/eal_common_options.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/common/eal_common_options.c index f8ab47435d..977ba21c51 100644 --- a/lib/librte_eal/common/eal_common_options.c +++ b/lib/librte_eal/common/eal_common_options.c @@ -228,9 +228,9 @@ eal_save_args(int argc, char **argv) return -1; for (i = 0; i < argc; i++) { - eal_args[i] = strdup(argv[i]); if (strcmp(argv[i], "--") == 0) break; + eal_args[i] = strdup(argv[i]); } eal_args[i++] = NULL; /* always finish with NULL */ -- 2.33.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-11-10 14:17:04.159870986 +0800 +++ 0046-eal-fix-memory-leak-when-saving-arguments.patch 2021-11-10 14:17:01.797413358 +0800 @@ -1 +1 @@ -From 4777674c4428f528fa2890d8afab551f6dd54c24 Mon Sep 17 00:00:00 2001 +From fcece17c517b90e30826955e4a6f6f54df2c0e90 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 4777674c4428f528fa2890d8afab551f6dd54c24 ] @@ -18 +21 @@ - lib/eal/common/eal_common_options.c | 2 +- + lib/librte_eal/common/eal_common_options.c | 2 +- @@ -21,5 +24,5 @@ -diff --git a/lib/eal/common/eal_common_options.c b/lib/eal/common/eal_common_options.c -index 6ecf5fd660..eaef57312f 100644 ---- a/lib/eal/common/eal_common_options.c -+++ b/lib/eal/common/eal_common_options.c -@@ -223,9 +223,9 @@ eal_save_args(int argc, char **argv) +diff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/common/eal_common_options.c +index f8ab47435d..977ba21c51 100644 +--- a/lib/librte_eal/common/eal_common_options.c ++++ b/lib/librte_eal/common/eal_common_options.c +@@ -228,9 +228,9 @@ eal_save_args(int argc, char **argv)