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 DB05043B86 for ; Tue, 5 Mar 2024 10:55:41 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D53CE40A72; Tue, 5 Mar 2024 10:55:41 +0100 (CET) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2089.outbound.protection.outlook.com [40.107.94.89]) by mails.dpdk.org (Postfix) with ESMTP id 22E9A4014F for ; Tue, 5 Mar 2024 10:55:41 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=APXPjBcqI0Y4Q4qadWtgIyFl7uFGvJsGtculTugl9yprdTUUIgCZylFAOuPqS1StnEUeu4hDYYCi0KXUbvJ+uFYTHnhoiUtyhIAC66ooMlyj/iSnk9N6rESduiD7PkuU1mWH3iMS7z8GeRCpntkLOyPBTM7C2SPYQEjm8EwdhEWrBL1iu9iXRH0I6vQrcAD9tJeGOR1k/W5OAFJKz06Qy6ORwj021SrfyeA3FXccw+SxUj4CG5Ueo+GHaiHYURdOue+ronmyVZhnxT4bpBKwl+f2TtFVxDfToduEiFlTJiN8vwBkSaf5TQKv/A9F+Y1UJs/RggHFY31MBlHnE1dsZA== 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=YpsLi7V1dQbyQCvrmJbeyhLEbIXmZ1Mi6s5dyzC6Qdk=; b=R4+t8Oim+3JXy95PhriBKVZqYI9LWMXGLYcUzEXpuKEg6U32ySqBGdmoEcUHjpLY1s3FlZNqoxqZvx9QTqlYtMu+H1IxgwebpGuEcf+YoMyI4j9Mx8tzr2aU4Lr3Ecrr50YlQOZVPrz+L2SM6zsc37oqqfowH5eVumz1IUL9jRh95u//pexWQlfBaPTTMGpiBbHU4UgB4RBIb+RJxmbwOEYVVuWXM87PHPlTKe38QZbsufZTtgfq5b8XvCox8mM397dEw3F6PWsbuovu0EkhdPoC6zU5Oeycrpd7FBk285qXQY9yHLEeT9RC2LJK5YSTPYM/umc2yLxhoxEW36oGyA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=huawei.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) 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=YpsLi7V1dQbyQCvrmJbeyhLEbIXmZ1Mi6s5dyzC6Qdk=; b=PAtHsWYLlnaHYMmctfzW+WftXwUhqQzqwTY+k4X+ftL5ON7kqk2rQrjAgLrNI2kINvTb6dF7r8bh7MiDi+ldpCor0cOer40tfwafDrJY7pbsIha5Q9DBgVpjCml5nU+kIKKXQ0PJERJCpF8xzLplGFjGt1N9N1xuO4WKOwArcQKz/IUsipcCu9yCNKLPq1f6E5wS+P/+cR/yj8lOo1LU7gjj/lBDqNGkWtl0/0l5tFbBTcUFSQaGmLaZux6wanJA+iY/rbImNFhxMq+2p1c28K+HHRhCennF6f2ShdOx5celc79RGXMI1A6yI0ofCcSBxPcnbQedGa0iNqwrscTvcw== Received: from SJ0PR03CA0119.namprd03.prod.outlook.com (2603:10b6:a03:333::34) by DM4PR12MB6278.namprd12.prod.outlook.com (2603:10b6:8:a4::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.39; Tue, 5 Mar 2024 09:55:38 +0000 Received: from CO1PEPF000042AD.namprd03.prod.outlook.com (2603:10b6:a03:333:cafe::9f) by SJ0PR03CA0119.outlook.office365.com (2603:10b6:a03:333::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.39 via Frontend Transport; Tue, 5 Mar 2024 09:55:38 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by CO1PEPF000042AD.mail.protection.outlook.com (10.167.243.42) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7362.11 via Frontend Transport; Tue, 5 Mar 2024 09:55:37 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Tue, 5 Mar 2024 01:55:20 -0800 Received: from nvidia.com (10.126.231.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.12; Tue, 5 Mar 2024 01:55:19 -0800 From: Xueming Li To: Yunjian Wang CC: Ciara Loftus , Ferruh Yigit , dpdk stable Subject: patch 'net/af_xdp: fix memzone leak on config failure' has been queued to stable release 23.11.1 Date: Tue, 5 Mar 2024 17:47:01 +0800 Message-ID: <20240305094757.439387-81-xuemingl@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240305094757.439387-1-xuemingl@nvidia.com> References: <20240305094757.439387-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.231.35] X-ClientProxiedBy: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1PEPF000042AD:EE_|DM4PR12MB6278:EE_ X-MS-Office365-Filtering-Correlation-Id: 33fb6f9c-f264-460a-7104-08dc3cfa6907 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: v3N1w+Fabb2gNQMmtI530Uv2UaPjsfbyJviYy6E5ZkLv3dWnK2vKeq6719oNZoWpcFvpFH7YAQWI2U0gEU350FiA+bUo2RW8/GbcFu4LyQuhQUzEOC8PKfrBolPiJ6v0PZvXfumvatkv3cJmrwWmEnTFiSqgAGpuJ9WIg85KoX75mXaYJ2g8jMpoWdLBhOa0JE+fZL3voLVDyd2UDiu54GvYatoHEANMsrCkadQXr7G+uz3SbkeGKN/mzReHld9icDvTnEDoswYjioY4G0jdmbEoYvLuwRlCDr9Jp63LD/eO9y5OkhSmKTTMMNT5DhhM0mTcYref+F65XPtcJEoHnegCHBwmctqjni8Zt8+AA3gsUQoDGd4505hmnRybZ9jHeQAhFVsH7smGwNNCfdNRcKTguwbxbm7hcn+YEGFahXQIukmjbY4WCh2anj0YA31v7xi7lsEmjV8c/B+7xI+oX4yK2oOBNZysBquC4h1Q1vuH06Jv70XHwXKbm/HPNN/KlBeUxV2SrjyoTaaP2vEyG6fm32ZHBQufSwkVpyRHz8eMsoS8pkvaQtk/wISg6mC6VrY5WdUxfmvxm7ATuYc9GwfGQRhNy2v58UT5PXgk+7y+9VSMDVoB6FzS1codY8W1FMzT4u3ln+kfwn66Lu0lmOpT6zTlCQTUiEvijkujujJFT9y8NyAzMWSrqQk0FrBC9Db7HckBuDUVekNn9liN010zTbDN4kP09+aT2aQToGUaFrLSj9OiNQdi3njhPMqK X-Forefront-Antispam-Report: CIP:216.228.117.160; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge1.nvidia.com; CAT:NONE; SFS:(13230031)(82310400014)(36860700004)(376005); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Mar 2024 09:55:37.9791 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 33fb6f9c-f264-460a-7104-08dc3cfa6907 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.160]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1PEPF000042AD.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB6278 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 23.11.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 03/31/24. 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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging This queued commit can be viewed at: https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=01809245ba198265312458828a253a0b87bd2ec8 Thanks. Xueming Li --- >From 01809245ba198265312458828a253a0b87bd2ec8 Mon Sep 17 00:00:00 2001 From: Yunjian Wang Date: Tue, 5 Dec 2023 20:23:51 +0800 Subject: [PATCH] net/af_xdp: fix memzone leak on config failure Cc: Xueming Li [ upstream commit 960775fc5b7d43cfbf9fa31e4c0b36c4da79615a ] In xdp_umem_configure() allocated memzone for the 'umem', we should free it when xsk_umem__create() call fails, otherwise it will lead to memory zone leak. To fix it move 'umem->mz = mz;' assignment after 'mz == NULL' check. Fixes: f1debd77efaf ("net/af_xdp: introduce AF_XDP PMD") Signed-off-by: Yunjian Wang Acked-by: Ciara Loftus Acked-by: Ferruh Yigit --- drivers/net/af_xdp/rte_eth_af_xdp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c index 353c8688ec..2d151e45c7 100644 --- a/drivers/net/af_xdp/rte_eth_af_xdp.c +++ b/drivers/net/af_xdp/rte_eth_af_xdp.c @@ -1234,6 +1234,7 @@ xsk_umem_info *xdp_umem_configure(struct pmd_internals *internals, AF_XDP_LOG(ERR, "Failed to reserve memzone for af_xdp umem.\n"); goto err; } + umem->mz = mz; ret = xsk_umem__create(&umem->umem, mz->addr, ETH_AF_XDP_NUM_BUFFERS * ETH_AF_XDP_FRAME_SIZE, @@ -1244,7 +1245,6 @@ xsk_umem_info *xdp_umem_configure(struct pmd_internals *internals, AF_XDP_LOG(ERR, "Failed to create umem\n"); goto err; } - umem->mz = mz; return umem; -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-03-05 17:39:33.416803581 +0800 +++ 0080-net-af_xdp-fix-memzone-leak-on-config-failure.patch 2024-03-05 17:39:30.823566495 +0800 @@ -1 +1 @@ -From 960775fc5b7d43cfbf9fa31e4c0b36c4da79615a Mon Sep 17 00:00:00 2001 +From 01809245ba198265312458828a253a0b87bd2ec8 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 960775fc5b7d43cfbf9fa31e4c0b36c4da79615a ] @@ -12 +14,0 @@ -Cc: stable@dpdk.org