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 CF938A0C41 for ; Tue, 30 Nov 2021 17:37:23 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CB3FA4118F; Tue, 30 Nov 2021 17:37:23 +0100 (CET) Received: from smtp-relay-internal-1.canonical.com (smtp-relay-internal-1.canonical.com [185.125.188.123]) by mails.dpdk.org (Postfix) with ESMTP id CEDAB411A7 for ; Tue, 30 Nov 2021 17:37:22 +0100 (CET) Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id A5E533FFE1 for ; Tue, 30 Nov 2021 16:37:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1638290242; bh=cepajNZSBbK9WOM7jgyQy8nW5KgZpJY300Jqpdg+5mA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=bXI7O+QGc0ch22+x2/WlIKoe35HEqncE/MYrXaGh/Prxyi0MOzULluAKGQuizMOMk hCEfkSrtQYMjBuiivB+th3s8rsBWlrbePPOeE1pirLhRGbbkEmagH6VOr0RambD3Wz vGAZBzXsko9FQQo9O8LTaMqHpgmV6YXTyAmx6Hi2nF5jpztLoY2yH9gqXr6gwkBnUN v4DK5yFrknofcuD+Q1n0UMO/ihItO5kSE8l+wLwncH1JW4Z2gQYevKCuPCzZ5XwdNB FtvsYSoS+9V/mJyrdlenu77+yVkKuqjSPainGRcCTnVEqKBMA3SI/Kv0ORFWgz8I2u TLpvEZ+X1T1IA== Received: by mail-ed1-f69.google.com with SMTP id i19-20020a05640242d300b003e7d13ebeedso17441449edc.7 for ; Tue, 30 Nov 2021 08:37:22 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=cepajNZSBbK9WOM7jgyQy8nW5KgZpJY300Jqpdg+5mA=; b=00cZ9LESS+Gvd18daic1xKw1nMDbLuar2BnmMoWHCgxLe0WB68iWXRPwVt8iAOClVu ORU4SGs4VfkeLGv2DoOyEZ3bSNMBEnK2AIfeVcXWYoDM3BAP5DV1gBF+cTuVNjY7lMaU TrnOy6Mvw2y/wcGOB8h1fixOPMhaqc+8BKDdZzJ7pMPIOAeh+WZq10BESS4/w1OFQTM0 62dgVKLxFEy/CBQZM22Mb53o3Ip7J8CJVKEnZTX7bV4Mlri5Xjj3Pouh2g+KwXAbRfxU Gkw6n3Tet5JV2CmL4+9rRmRJC3M91LyPlSJvJoH7GfLiovmXP/854BlhGAK2jMWSlH7a 5tug== X-Gm-Message-State: AOAM531Gv5EumnWQafQzoy5RJEENz5yaRL/Cn1qTX0id/Of0DTeklBE0 19zqUg/wB+kxAq9BQciS1KSg1hdx1k8xsp2ZzOEUufJUnwobRZV9mZ37O6OpgzQGrrZu5QbL0Pq u/tGOUxefCIa/Cv+zH/asIv+h X-Received: by 2002:aa7:d5d6:: with SMTP id d22mr63359eds.364.1638290241542; Tue, 30 Nov 2021 08:37:21 -0800 (PST) X-Google-Smtp-Source: ABdhPJxY980YfiXS2ghWgtdceCjP0mT3tgWJNO4XlBUHlbqMm8o1XQfDAIds6ybu89qLGorOw5klLA== X-Received: by 2002:aa7:d5d6:: with SMTP id d22mr63336eds.364.1638290241413; Tue, 30 Nov 2021 08:37:21 -0800 (PST) Received: from localhost.localdomain ([2001:67c:1560:8007::aac:c4ad]) by smtp.gmail.com with ESMTPSA id a13sm8722422edk.29.2021.11.30.08.37.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Nov 2021 08:37:20 -0800 (PST) From: christian.ehrhardt@canonical.com To: Qiming Chen Cc: Haiyue Wang , dpdk stable Subject: patch 'net/ixgbe: fix MAC resource leak' has been queued to stable release 19.11.11 Date: Tue, 30 Nov 2021 17:33:47 +0100 Message-Id: <20211130163605.2460997-23-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211130163605.2460997-1-christian.ehrhardt@canonical.com> References: <20211130163605.2460997-1-christian.ehrhardt@canonical.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 19.11.11 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before December 10th 2021. 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/cpaelzer/dpdk-stable-queue This queued commit can be viewed at: https://github.com/cpaelzer/dpdk-stable-queue/commit/eb965c7d46148a2f1fb5fd5006de9717e71a66dd Thanks. Christian Ehrhardt --- >From eb965c7d46148a2f1fb5fd5006de9717e71a66dd 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 [ 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 a938729da7..a9607e7914 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -1259,6 +1259,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; } @@ -1719,6 +1721,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.34.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-11-30 16:50:07.470518905 +0100 +++ 0023-net-ixgbe-fix-MAC-resource-leak.patch 2021-11-30 16:50:05.594872092 +0100 @@ -1 +1 @@ -From cc8aaa258f31cf28776141e2e2f9c370bbb9ae55 Mon Sep 17 00:00:00 2001 +From eb965c7d46148a2f1fb5fd5006de9717e71a66dd Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit cc8aaa258f31cf28776141e2e2f9c370bbb9ae55 ] + @@ -13 +14,0 @@ -Cc: stable@dpdk.org @@ -22 +23 @@ -index 3371a7df78..47693c0c47 100644 +index a938729da7..a9607e7914 100644 @@ -25 +26 @@ -@@ -1218,6 +1218,8 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused) +@@ -1259,6 +1259,8 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused) @@ -34 +35 @@ -@@ -1667,6 +1669,8 @@ eth_ixgbevf_dev_init(struct rte_eth_dev *eth_dev) +@@ -1719,6 +1721,8 @@ eth_ixgbevf_dev_init(struct rte_eth_dev *eth_dev)