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 1583B455AD for ; Mon, 15 Jul 2024 17:29:27 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 106BE40DD0; Mon, 15 Jul 2024 17:29:27 +0200 (CEST) Received: from mail-wr1-f41.google.com (mail-wr1-f41.google.com [209.85.221.41]) by mails.dpdk.org (Postfix) with ESMTP id 7A7FD40A71 for ; Mon, 15 Jul 2024 17:29:25 +0200 (CEST) Received: by mail-wr1-f41.google.com with SMTP id ffacd0b85a97d-3679f806223so3275081f8f.0 for ; Mon, 15 Jul 2024 08:29:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721057365; x=1721662165; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=gtdhgW1LmUXDhyQIzf9gHIf38kDgyL+XQ+iBhLP489I=; b=leTHC0GH8SmiK/E6qhipEJJgRtCYVa9WiIVswDxhRNn/jnwzpPv8oEspesIn4n12fg 2ObiHwQSc39WHmjmEtbad5rDHuYC+rP0/OqLtfL+CxYw1p4hi6cCch3Un1DATYlxFerA jwxerwrWAUaLDNm8H6p88URk1U56dUm1BP2k56ooEOTebLQLHuFVGavEZkdndpZQWLqD 8d8xrEAx/TMmuIONs7db/m128u9HTpV2Fvo1o5j5l/+tJ+Yd6MhbUIUDdST6JNBzyKxK O7VF3w/d+S6FRmGDIK4CyCVvmRXm4Jx7bVag8FZilG6/Tp3Bv0r6JT8+rKicmzRJV0VJ o42w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721057365; x=1721662165; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=gtdhgW1LmUXDhyQIzf9gHIf38kDgyL+XQ+iBhLP489I=; b=KWmovMidz1vRyNe77V4DW9JMwPmrHtMgcEFphbLmX0/VVTEmLW9gL+lNxJBkvPhu0Y SpQfjoGjWiRoxm4zTQ6CAVnaFonmgjNHYfdnbnVf0wh5Pa9FHSbYwhxHwN1Dc/GOXXOt fVHW2CO8i2n9XeF4a9pgY/ivSR4pNCgpCOoZ99ECa8POJPWjEjZl4ww5bIFBiWvWYf4B tbEUA91FqWvW7rpMou3DHvGXhu+PaQ2l8fB0aln9qLEnjgNj+V492+S79gC/y2kLUZWz 3qKwYEYCiNuuBrkm28/5OhV/KpoQKTnMTw9PlqYd75plPVFN/Q+bsUz3nifJdUjaJPjH uDcw== X-Forwarded-Encrypted: i=1; AJvYcCV0treqbFC4bfr/px4i/0dd7xJOAalIu4hpq+QmbEYeB4SJJLah26CaIbyeoCUagWfltJW6He32TiCEu9KkbCs= X-Gm-Message-State: AOJu0YzsCAObCvrDJz2oQcT5I1PccmEV1BM22htwE9vIOe3PWH9TI0Uq KGnPxet8r/q6+LkMZs1dxNncZYXiq2zXnAkMO3gQj1v9+BVueLAKn7GyqsgLmiY= X-Google-Smtp-Source: AGHT+IGTO1ghoK7R0FiELr8Tn9XQz/RF7M+yBy4ZbLXXJXIgaTuHhCIO2dgITkPIozgv8v3Go4n8ig== X-Received: by 2002:a5d:4d48:0:b0:362:69b3:8e4d with SMTP id ffacd0b85a97d-36823c6d1camr208629f8f.25.1721057365135; Mon, 15 Jul 2024 08:29:25 -0700 (PDT) Received: from localhost ([2a01:4b00:d036:ae00:7aef:1aaa:3dff:d546]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3680dafbf19sm6649550f8f.68.2024.07.15.08.29.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jul 2024 08:29:24 -0700 (PDT) From: luca.boccassi@gmail.com To: Eric Joyner Cc: Ian Stokes , Bruce Richardson , dpdk stable Subject: patch 'net/ice/base: fix memory leak in firmware version check' has been queued to stable release 22.11.6 Date: Mon, 15 Jul 2024 16:26:23 +0100 Message-Id: <20240715152704.2229503-45-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240715152704.2229503-1-luca.boccassi@gmail.com> References: <20240624235907.885628-81-luca.boccassi@gmail.com> <20240715152704.2229503-1-luca.boccassi@gmail.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 22.11.6 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 07/17/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://github.com/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/64f49919dd07cb0b6d70c32703f0afb61de44139 Thanks. Luca Boccassi --- >From 64f49919dd07cb0b6d70c32703f0afb61de44139 Mon Sep 17 00:00:00 2001 From: Eric Joyner Date: Tue, 25 Jun 2024 12:12:25 +0100 Subject: [PATCH] net/ice/base: fix memory leak in firmware version check [ upstream commit 6b75956aacc081d56a36ab8f82c530832b288c01 ] If ice_cfg_phy_fec() goes through case ICE_FEC_DIS_AUTO but the underlying device firmware isn't the correct version, then the memory used to hold the PHY capabilities output from the firmware isn't freed. Fix this by making sure the memory is freed by jumping to the label that frees the memory instead of returning from the version check immediately. Fixes: 4b6ede113f55 ("net/ice/base: support auto FEC with FEC disabled") Signed-off-by: Eric Joyner Signed-off-by: Ian Stokes Acked-by: Bruce Richardson --- drivers/net/ice/base/ice_common.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/ice/base/ice_common.c b/drivers/net/ice/base/ice_common.c index a327a4b374..ac67411ebd 100644 --- a/drivers/net/ice/base/ice_common.c +++ b/drivers/net/ice/base/ice_common.c @@ -3803,8 +3803,10 @@ ice_cfg_phy_fec(struct ice_port_info *pi, struct ice_aqc_set_phy_cfg_data *cfg, break; case ICE_FEC_DIS_AUTO: /* Set No FEC and auto FEC */ - if (!ice_fw_supports_fec_dis_auto(hw)) - return ICE_ERR_NOT_SUPPORTED; + if (!ice_fw_supports_fec_dis_auto(hw)) { + status = ICE_ERR_NOT_SUPPORTED; + goto out; + } cfg->link_fec_opt |= ICE_AQC_PHY_FEC_DIS; /* fall-through */ case ICE_FEC_AUTO: -- 2.39.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-07-15 16:19:36.916273769 +0100 +++ 0045-net-ice-base-fix-memory-leak-in-firmware-version-che.patch 2024-07-15 16:19:34.576206634 +0100 @@ -1 +1 @@ -From 6b75956aacc081d56a36ab8f82c530832b288c01 Mon Sep 17 00:00:00 2001 +From 64f49919dd07cb0b6d70c32703f0afb61de44139 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 6b75956aacc081d56a36ab8f82c530832b288c01 ] + @@ -15 +16,0 @@ -Cc: stable@dpdk.org @@ -25 +26 @@ -index 3d787d2a29..ef6696cddf 100644 +index a327a4b374..ac67411ebd 100644 @@ -28 +29 @@ -@@ -3843,8 +3843,10 @@ ice_cfg_phy_fec(struct ice_port_info *pi, struct ice_aqc_set_phy_cfg_data *cfg, +@@ -3803,8 +3803,10 @@ ice_cfg_phy_fec(struct ice_port_info *pi, struct ice_aqc_set_phy_cfg_data *cfg,