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 70C58A034F for ; Wed, 10 Nov 2021 07:51:48 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6A8FE40142; Wed, 10 Nov 2021 07:51:48 +0100 (CET) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2073.outbound.protection.outlook.com [40.107.93.73]) by mails.dpdk.org (Postfix) with ESMTP id C067440142 for ; Wed, 10 Nov 2021 07:51:46 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jCtwf8y3w1Sr8O4foA3DQuINPO17kW6PD+q2CoAJwvL6p0INqTtcwgtVeGAdjSoDQfG1gdbNJHEv8MV1eeYi/dYTCubEQ3EVj56wAAw+OO19rUwEmveeVFs6s4uWDqJXyrTha9rgnjPavNEN+DRS8TPBVJo6/UbkAc9dD8bvnGJXDXDcIJnOxeNQkTcOCmk6mYyhdb7wKHtiQM38kSp5mG6Cqw0ItXqU6cCkeNeekg1fKRftq7EWwiMI7sDt7eocbtuHLBuM8wHo1tmSwiJB3QV0GSj3JPZUliQFZT8EtepC/NcOzY4U69U1zz+sCcraSEnDp/TXXPGUkSsjzigrLg== 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=BmW2srcIrsyM0C3ZkUYAevutpaFfFP93Ouv9aBA6N+U=; b=lEjrvpRFqmCrRfZrttdwfqEKsC2VrCdxmoxx98+5JifvXu/fUHQAPHBPzTv5yW2tbmn9Opy6NfzTXsbXA0youW+hBJPBLtRaoeB7ILn1f3nmScmQRVcD9IU4TPALc424dQpIeGGMI8niVHnkmPi9Vc98i/5HbylVsBeYFzrewg/Ndaepe/84ZQVSKVAbp8Eam5INmtWLmud+B706o8kub6JHJ0rZC9FELDLqzChwke7d83BpxBWRCROP91WspV87xjUmUGHf0EnVvobZqBj3JpvNX6a8jwRgpVfyGZrTltOzULzBoOGUq/B8Z/NzClHBbIqpohqbWjJ+/VIfvYspTw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=6wind.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=BmW2srcIrsyM0C3ZkUYAevutpaFfFP93Ouv9aBA6N+U=; b=q3ulOLxZ/vWPgTPzRAMwUTOPFW1PAwxgFc5zp67wWzDS1W06F88Qh8k78OdRWfey2eOHALCetx4m1r/PfpruvDYvUr7JPlRzAsaJ3oxGx55Yc/HbhKWBKtg6uo/uSLX2bHH2cCUBxdzoKqA1VZFDvk0FA+wrkNV8vpiq6ZpmK456AYAQkvZ/A13GlgvG2u0eC5HsHxTpm8DetYFHr/cJJuJD0sY1rnjWeFLV4jDH9xCs2VrKV9mnoz203RcW5Tmdp2l2kVmrTXIBu6F6d6A7FzAS+unhNTSyQXFRyAwbZZNxAiLPhIQpcxto0HNBisa/kryDb2ZoTmM2VliUE+xU4A== Received: from BN6PR11CA0052.namprd11.prod.outlook.com (2603:10b6:404:f7::14) by CY4PR12MB1272.namprd12.prod.outlook.com (2603:10b6:903:3e::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.13; Wed, 10 Nov 2021 06:51:44 +0000 Received: from BN8NAM11FT065.eop-nam11.prod.protection.outlook.com (2603:10b6:404:f7:cafe::7c) by BN6PR11CA0052.outlook.office365.com (2603:10b6:404:f7::14) 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:51:44 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; 6wind.com; dkim=none (message not signed) header.d=none;6wind.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 BN8NAM11FT065.mail.protection.outlook.com (10.13.177.63) 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:51:44 +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:51:41 +0000 From: Xueming Li To: Zhihong Peng CC: Luca Boccassi , Dmitry Kozlyuk , Olivier Matz , dpdk stable Date: Wed, 10 Nov 2021 14:30:58 +0800 Message-ID: <20211110063216.2744012-175-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: 41f0797a-1225-4399-666b-08d9a4168ece X-MS-TrafficTypeDiagnostic: CY4PR12MB1272: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:10000; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Yss1JIOiu9X9tdaz/FpbmjYz1NgqVPoCcmnEJMQMWyVAFds/BdOhThrTuTOWLacu7beWkJkANACmbIbiQ8lwCfXbz5tYqZkX8pgftgxDPf8lrv7Ei1pmWnSge2ctAVpXgtYtp54BCVn38ai+AllKES1eD4bbteitA2AssYETDuHzi+s81+jUsxntKHyDMdNq96ilXd1VjOHYwarvuYqyXs4CKZF4ollKtfaWQVJf1goBiFvFxLyeXtGhCqWAaOhtjVsMrCb+4cuhhJRGlgIiV48+SAnCWwk+SjE5WxtOQm7txOTAcWTT0RRfJLyFVYMqqFyQoS9HGal4egPqZvAHPeOp3wPPydUx8m7kI8RrBUxyeaezkY0S+xyG3BZtYem+tC8bnehKfoO2w5UR8biJx5q2497jMsCCJ7LIjOlABDeD2Qg7kkdT1ddRsrDczTAYg4P63DiRErX4p00ISMeHjqr/6u87h/MjLW9EzGtaf7Odm0HS3JRwDAlmjFyHOnlOz7E6PA1l1Juja7X7t03hCPaHlmReS9DbkQYBC1ZrZN20l2BbnoKSvBGjn0bHmPZ0w/tmR3BwjF6quB0I6KXIF6d6pl0kMnD+YheYiWGwEMD39NmYRF3zyJBJfe1kVpjBShRnY1zmjIPSd3HEH+q6y4FyfAS8qXp634PfHhfUyhsohm1CVOM/jxvbFuETTYLsFQxDdeUsqG96pzNJLHMg1cKNRbtMiRdIA+jNp0i5gf3z4zP/3TQ8lTZ/7y/OZel2mPQ6s5xaJ9kHJPTqO+Q2v95k5NaPK/UeGYu06xJqt3u8TSqiWtp9NeV/3relpgcvbV7/ygad3aWsA9fWWnHK8w== 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)(508600001)(83380400001)(1076003)(36756003)(7636003)(336012)(26005)(966005)(7696005)(356005)(6916009)(82310400003)(5660300002)(55016002)(4001150100001)(6286002)(6666004)(54906003)(47076005)(16526019)(316002)(8676002)(186003)(2616005)(86362001)(8936002)(70206006)(36860700001)(426003)(53546011)(4326008)(70586007)(2906002); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Nov 2021 06:51:44.0013 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 41f0797a-1225-4399-666b-08d9a4168ece 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: BN8NAM11FT065.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR12MB1272 Subject: [dpdk-stable] patch 'cmdline: free on exit' 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/f181839864ae7ba170519235a6da969a7df36a85 Thanks. Xueming Li --- >From f181839864ae7ba170519235a6da969a7df36a85 Mon Sep 17 00:00:00 2001 From: Zhihong Peng Date: Mon, 18 Oct 2021 21:58:50 +0800 Subject: [PATCH] cmdline: free on exit Cc: Xueming Li [ upstream commit 6ad06203a587a8ce10392d9224e9fbdcb77b3d5c ] Malloc cl in the cmdline_stdin_new function, so release in the cmdline_stdin_exit function is logical, so that cl will not be released alone. Fixes: af75078fece3 ("first public release") Signed-off-by: Zhihong Peng Reviewed-by: Dmitry Kozlyuk Acked-by: Olivier Matz Tested-by: Zhihong Peng --- app/test/test.c | 1 - app/test/test_cmdline_lib.c | 1 - lib/librte_cmdline/cmdline_socket.c | 1 + 3 files changed, 1 insertion(+), 2 deletions(-) diff --git a/app/test/test.c b/app/test/test.c index 864523ed61..f7d0946761 100644 --- a/app/test/test.c +++ b/app/test/test.c @@ -195,7 +195,6 @@ main(int argc, char **argv) cmdline_interact(cl); cmdline_stdin_exit(cl); - cmdline_free(cl); } #endif ret = 0; diff --git a/app/test/test_cmdline_lib.c b/app/test/test_cmdline_lib.c index d5a09b4541..6bcfa6511e 100644 --- a/app/test/test_cmdline_lib.c +++ b/app/test/test_cmdline_lib.c @@ -174,7 +174,6 @@ test_cmdline_socket_fns(void) /* void functions */ cmdline_stdin_exit(NULL); - cmdline_free(cl); return 0; error: printf("Error: function accepted null parameter!\n"); diff --git a/lib/librte_cmdline/cmdline_socket.c b/lib/librte_cmdline/cmdline_socket.c index 0fe1497008..f919537460 100644 --- a/lib/librte_cmdline/cmdline_socket.c +++ b/lib/librte_cmdline/cmdline_socket.c @@ -57,4 +57,5 @@ cmdline_stdin_exit(struct cmdline *cl) return; terminal_restore(cl); + cmdline_free(cl); } -- 2.33.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-11-10 14:17:09.660774437 +0800 +++ 0174-cmdline-free-on-exit.patch 2021-11-10 14:17:01.984078497 +0800 @@ -1 +1 @@ -From 6ad06203a587a8ce10392d9224e9fbdcb77b3d5c Mon Sep 17 00:00:00 2001 +From f181839864ae7ba170519235a6da969a7df36a85 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 6ad06203a587a8ce10392d9224e9fbdcb77b3d5c ] @@ -17,5 +20,4 @@ - app/test/test.c | 1 - - app/test/test_cmdline_lib.c | 1 - - doc/guides/rel_notes/release_21_11.rst | 3 +++ - lib/cmdline/cmdline_socket.c | 1 + - 4 files changed, 4 insertions(+), 2 deletions(-) + app/test/test.c | 1 - + app/test/test_cmdline_lib.c | 1 - + lib/librte_cmdline/cmdline_socket.c | 1 + + 3 files changed, 1 insertion(+), 2 deletions(-) @@ -24 +26 @@ -index 173d202e47..5194131026 100644 +index 864523ed61..f7d0946761 100644 @@ -27 +29 @@ -@@ -233,7 +233,6 @@ main(int argc, char **argv) +@@ -195,7 +195,6 @@ main(int argc, char **argv) @@ -36 +38 @@ -index 054ebf5e9d..f238094b07 100644 +index d5a09b4541..6bcfa6511e 100644 @@ -39 +41 @@ -@@ -180,7 +180,6 @@ test_cmdline_socket_fns(void) +@@ -174,7 +174,6 @@ test_cmdline_socket_fns(void) @@ -47,19 +49,5 @@ -diff --git a/doc/guides/rel_notes/release_21_11.rst b/doc/guides/rel_notes/release_21_11.rst -index 9b1843eb09..450bcbb445 100644 ---- a/doc/guides/rel_notes/release_21_11.rst -+++ b/doc/guides/rel_notes/release_21_11.rst -@@ -325,6 +325,9 @@ API Changes - removed. Its usages have been replaced by a new function - ``rte_kvargs_get_with_value()``. - -+* cmdline: ``cmdline_stdin_exit()`` now frees the ``cmdline`` structure. -+ Calls to ``cmdline_free()`` after it need to be deleted from applications. -+ - * cmdline: Made ``cmdline`` structure definition hidden on Linux and FreeBSD. - - * cmdline: Made ``rdline`` structure definition hidden. Functions are added -diff --git a/lib/cmdline/cmdline_socket.c b/lib/cmdline/cmdline_socket.c -index 998e8ade25..ebd5343754 100644 ---- a/lib/cmdline/cmdline_socket.c -+++ b/lib/cmdline/cmdline_socket.c -@@ -53,4 +53,5 @@ cmdline_stdin_exit(struct cmdline *cl) +diff --git a/lib/librte_cmdline/cmdline_socket.c b/lib/librte_cmdline/cmdline_socket.c +index 0fe1497008..f919537460 100644 +--- a/lib/librte_cmdline/cmdline_socket.c ++++ b/lib/librte_cmdline/cmdline_socket.c +@@ -57,4 +57,5 @@ cmdline_stdin_exit(struct cmdline *cl)