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 E0037A034F for ; Wed, 10 Nov 2021 07:37:05 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DB2D340683; Wed, 10 Nov 2021 07:37:05 +0100 (CET) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2072.outbound.protection.outlook.com [40.107.236.72]) by mails.dpdk.org (Postfix) with ESMTP id 99CD340E28 for ; Wed, 10 Nov 2021 07:37:04 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fKHIhYXYQI7pKVL/YQmC+q2eGeWSZSGpiImugInAfr8GRKVYPFv9qC1TXn0HyebC5mWKgVe0GHUnazDAxrIKTfOXDTy7IRfk88kNog3sbzgISeF8Z+hUqZWlSXK9yL7vglnNiVbtPUT9b7Ni6RCb1iq/W1hWOg01k7P2/2DE6J+f4qLsW+uayA2dCTqAhVsETd1a4egyDoqYenfWr5qTnBeZcf5ASQFoiZSIU65c+s/7rS56qgtSzvAdyhoKctDsLb3I9ebgkxeJ9gnpTN9Dg+z3ZHNuvfw/t8h8x+RT9rylKW+GcdrXw8yNEyOHJ5Lw0VKWq9hYzV17Qe18t5/68A== 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=bRa2vrj3z0u+2eS2HVx9CqO7lE9Muplz8NqNhd4v+cI=; b=jSURrhYJNHWFMrSxuXqC9PfcMgkSSq5vtLmCwrUJ8vZTHm4VnxGDCuJdYHt7wRX1s1PerXDuIMS/Loty+X9V/8logESzHX0GHZG5lvNhD3U45KwxXej5zzsF+FYfYSOcBIXQSrKqwV5tQZiCYDPea5pBNXl2juxkTEzbRD40FOx+2wqPEk0HTka6m3Vn9iFZ+xmjoss/x01bpZ1dQ0qnBMG1JKtVVyZp0SwGu3zOftzWP89cs4ny8giEfOqJPVOmC299/xpExF1FHyuqrYEyyiGVN5cE5Gz/8e8SoECADAQAoLDfE95+1H5Ch788BToRy7ZbmY98VpO6QOB6SaaLRQ== 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=bRa2vrj3z0u+2eS2HVx9CqO7lE9Muplz8NqNhd4v+cI=; b=rIcXacUJwCDOhHiW8NOfYQtCus21E2EZ18MbImexC2l2hWeLM38Gg/RUKXW/2Tjn4igOh/B4ptbabkvY2tHwlWYrrsgVKgFRerIg7aNQcpSZ7U+PZ35bRtLP+sfqW3+eC3Mw4gJNoOD+76D00AKZGt75HJw4Blgx/p4i4qdqgIgx4l7TfP1GLEGibUlnrXDRpOsDxQihaL2B+FqoncqkQg74c2CYLDCK5saRdlfU686foDQR/JC9FxmBT6x836yepoyYOamvnTp5IE647VxPjseWVblPi+8XMh2E+T+6tTPc9f7axGUp1F2qVMW3QmMTHQl0bonFvGgL8gtpxUXeIQ== Received: from DS7PR06CA0012.namprd06.prod.outlook.com (2603:10b6:8:2a::22) by SN1PR12MB2543.namprd12.prod.outlook.com (2603:10b6:802:2a::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.10; Wed, 10 Nov 2021 06:36:57 +0000 Received: from DM6NAM11FT027.eop-nam11.prod.protection.outlook.com (2603:10b6:8:2a:cafe::6a) by DS7PR06CA0012.outlook.office365.com (2603:10b6:8:2a::22) 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:36:57 +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 DM6NAM11FT027.mail.protection.outlook.com (10.13.172.205) 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:36:56 +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:36:54 +0000 From: Xueming Li To: Qiming Chen CC: Luca Boccassi , Haiyue Wang , dpdk stable Date: Wed, 10 Nov 2021 14:28:44 +0800 Message-ID: <20211110063216.2744012-41-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: 811a2d66-9501-422f-0901-08d9a4147de0 X-MS-TrafficTypeDiagnostic: SN1PR12MB2543: 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: u/QePRXc7hL+bzQ4KySiYfoPOyPlUowxuY03D/eu+VQ+6bqcaLhYUHw1JYSpfh/k4+A3VSafrqgEe6an0c5DZRE+Hv63kPjpuTrt+hUlzhyLAci4KsO0yE+63SPlEZK68INFse5UzYKBHCMxNzY/cNyolEZSi+mAF+40ea3tMtv12vR3eR/4Vec8ihYcJtPOKa5My/HjwpT7xYe3MtQRa8Bxs806mXHIxrZLBrQNHLonI5TCV9J9Wptf6UEk70DTr4mBUXXDB+g5poM8VVzPrhE0OC0wcAZoWS9DN5zg1Qyk5+HfANRkF5O7KbTp1pLE7OYr8E8fx7pjp/1rkNdawemPV9zBxbsvZMfb2pDHnZeAeFlfccUsNf+mZUMCjkCEw3HIWqqrOSNV1vB9YZV4Eq7oTAC/uKW961YTS6HG+PdkFL/hnSUw4A7HPPeJeNknjBMwPWmJGvV4G/5DaoM48UAkNs4nm4LE/s18FIrpbFcMf7dcheI/YfuCIs3z7uQ6bDhqHsTFyOCPpGAnKIKUsnz1jxpzfewyOMq54jcvnfm2J5vXePn2ySKTW4ofDtLPy13ZE+viifSoFjvZecwD8mzvueZMQQHL5cxOSdBGop3GguAkWmfiSPO4pddGoQexxJ5D1PJZHCu55IJJwFcBaWtCJpWRFZRpGg2fhGM971CiAThiLw9QmJ2v3ERh7p/cxSycoRAI25UsANpjWugklp/rOTjgFH5DUsA7/cp6wRwwLF2z9kXW8wbyyE6nmuFmtq6N1WDZM7eRXpzVvYzbwvfOXkjh4lJwJPhRXOEBpXBhe9TjZL6xU/pBJqweTdLXT/llvd4JnZihT8msrafHbg== 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)(36840700001)(46966006)(336012)(16526019)(70586007)(356005)(7696005)(82310400003)(54906003)(47076005)(4326008)(2906002)(316002)(1076003)(5660300002)(36860700001)(7636003)(70206006)(8676002)(55016002)(36756003)(186003)(8936002)(53546011)(6666004)(6916009)(6286002)(83380400001)(26005)(508600001)(4001150100001)(426003)(966005)(2616005)(86362001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Nov 2021 06:36:56.6692 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 811a2d66-9501-422f-0901-08d9a4147de0 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: DM6NAM11FT027.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR12MB2543 Subject: [dpdk-stable] patch 'net/ixgbe: fix MAC resource leak' 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/a1ebe4da329713217ef7fa82f179f82bbae1de87 Thanks. Xueming Li --- >From a1ebe4da329713217ef7fa82f179f82bbae1de87 Mon Sep 17 00:00:00 2001 From: Qiming Chen Date: Wed, 1 Sep 2021 15:12:07 +0800 Subject: [PATCH] net/ixgbe: fix MAC resource leak Cc: Xueming Li [ upstream commit cc8aaa258f31cf28776141e2e2f9c370bbb9ae55 ] In the eth_ixgbevf_dev_init and eth_ixgbe_dev_init functions, memory is allocated for the MAC address, and the address is stored in the eth_dev->data->mac_addrs member variable. If the subsequent function is abnormal, you need to use the rte_free function to release the MAC address memory. Fixes: af75078fece3 ("first public release") Signed-off-by: Qiming Chen Acked-by: Haiyue Wang --- drivers/net/ixgbe/ixgbe_ethdev.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c index f15cc7d4ef..969e31cdbf 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -1218,6 +1218,8 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused) PMD_INIT_LOG(ERR, "Failed to allocate %d bytes needed to store MAC addresses", RTE_ETHER_ADDR_LEN * IXGBE_VMDQ_NUM_UC_MAC); + rte_free(eth_dev->data->mac_addrs); + eth_dev->data->mac_addrs = NULL; return -ENOMEM; } @@ -1672,6 +1674,8 @@ eth_ixgbevf_dev_init(struct rte_eth_dev *eth_dev) default: PMD_INIT_LOG(ERR, "VF Initialization Failure: %d", diag); + rte_free(eth_dev->data->mac_addrs); + eth_dev->data->mac_addrs = NULL; return -EIO; } -- 2.33.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-11-10 14:17:03.903348317 +0800 +++ 0040-net-ixgbe-fix-MAC-resource-leak.patch 2021-11-10 14:17:01.794080052 +0800 @@ -1 +1 @@ -From cc8aaa258f31cf28776141e2e2f9c370bbb9ae55 Mon Sep 17 00:00:00 2001 +From a1ebe4da329713217ef7fa82f179f82bbae1de87 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit cc8aaa258f31cf28776141e2e2f9c370bbb9ae55 ] @@ -13 +15,0 @@ -Cc: stable@dpdk.org @@ -22 +24 @@ -index 3371a7df78..47693c0c47 100644 +index f15cc7d4ef..969e31cdbf 100644 @@ -34 +36 @@ -@@ -1667,6 +1669,8 @@ eth_ixgbevf_dev_init(struct rte_eth_dev *eth_dev) +@@ -1672,6 +1674,8 @@ eth_ixgbevf_dev_init(struct rte_eth_dev *eth_dev)