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 EABD9A00C2 for ; Thu, 3 Nov 2022 10:31:23 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E243640694; Thu, 3 Nov 2022 10:31:23 +0100 (CET) Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) by mails.dpdk.org (Postfix) with ESMTP id 2493840693 for ; Thu, 3 Nov 2022 10:31:22 +0100 (CET) Received: by mail-wm1-f51.google.com with SMTP id p13-20020a05600c468d00b003cf8859ed1bso735975wmo.1 for ; Thu, 03 Nov 2022 02:31:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; 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=T00bSS0CZqI+RPVKsAFhwNs9gU7B0zkLwMtPBmqjzuc=; b=PDMPGJN54UFTHB+PDYS2YOTuSv1+IXm6AWtFKlQyHRv875lpLOsQb5YCjevDEil6AY KSTPef4KoXKYNVAPX+/f2FOKMSJqV7AvLbdXJU1Rl3Jl5WmObITRaX/64NoNKQnZWaD7 MO7fBX3+48Ja04L+Zhz9AbMVGqo6c2AUuij/EClabhap8L13pfOORvcZWQ9HdgKjFlXd ElnvI4KGY1PoTJ52q/rVD5MWa2sS/Iq0ogCVZ0e92W0mpxndf2FOVZzqceoMcpfXF7cw yfCpbUDbT+psDS/2parU1xJsM3bDc08cn8722FhDahsN9w0dB9t+3fQ5iGTCIpAOXjES zLjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=T00bSS0CZqI+RPVKsAFhwNs9gU7B0zkLwMtPBmqjzuc=; b=74ABMgvWVp1crzNluYqug7zt6F9QtndD/N5YpiJNX4953jOjuAG/LTgGl4vTavX8bH OANid+8MjHoOt5UmTz0FzwagZ/+mxUJlGjZjRSBnLaZ3q3tP5wIu73LRdUvrtDJFKZCq JQblf2fhsNQ/ZNRXP7qsHrkO5UjTBbIY1OuroiOuLIp9Wyt60zT5sLvPGSR4562uFyRG EWFUedHKXwL9PMQ7DjAEowalwnEQ8BYVSrkRVCQa0H/N8dKwuKgw/vMmTWfbZRcdjEZ8 paqt5oLF9xYJT1CpBrU9tA+EKAGJWiU9L6EckrFci82+5IxVkj3xG3AaXLUcgkh10RDh NWsg== X-Gm-Message-State: ACrzQf3StreUJszPLSlhkOlEzxl5HUdpIby5k76xWIDReogc6FKr08pd Waq7QNIe5RaKqe4mr9/EV9s8f+agIeakB4tJ X-Google-Smtp-Source: AMsMyM7RPZcetwYXM0RiQh9fdWV+boOcXRdvbPruwgC33fLg1qJlR7Br/fJaN1TDygOtLOf7s3wk6Q== X-Received: by 2002:a1c:7c15:0:b0:3cf:5c5c:ab85 with SMTP id x21-20020a1c7c15000000b003cf5c5cab85mr18405733wmc.175.1667467881782; Thu, 03 Nov 2022 02:31:21 -0700 (PDT) Received: from localhost ([2a01:4b00:d307:1000:f1d3:eb5e:11f4:a7d9]) by smtp.gmail.com with ESMTPSA id k5-20020a7bc405000000b003cf6c2f9513sm750232wmi.2.2022.11.03.02.31.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Nov 2022 02:31:21 -0700 (PDT) From: luca.boccassi@gmail.com To: Kalesh AP Cc: Ajit Khaparde , Somnath Kotur , dpdk stable Subject: patch 'net/bnxt: fix representor info freeing' has been queued to stable release 20.11.7 Date: Thu, 3 Nov 2022 09:27:18 +0000 Message-Id: <20221103092758.1099402-60-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221103092758.1099402-1-luca.boccassi@gmail.com> References: <20221103092758.1099402-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 20.11.7 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/05/22. 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/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/8a78fa6b597477fb827334da3017f442621e2710 Thanks. Luca Boccassi --- >From 8a78fa6b597477fb827334da3017f442621e2710 Mon Sep 17 00:00:00 2001 From: Kalesh AP Date: Tue, 27 Sep 2022 21:29:02 +0530 Subject: [PATCH] net/bnxt: fix representor info freeing [ upstream commit 5fdf25bd5531b3cb267201272c259ba4d0a32ca5 ] Driver allocates "bp->rep_info" inside bnxt_init_rep_info() which is invoked from bnxt_rep_port_probe(). But the memory is freed inside bnxt_uninit_resources(), which is wrong. As a result, after error recovery bp->rep_info will be NULL. The memory should have freed inside bnxt_drv_uninit() to maintain symmetry of calls. Fixes: 6dc83230b43b ("net/bnxt: support port representor data path") Signed-off-by: Kalesh AP Reviewed-by: Ajit Khaparde Reviewed-by: Somnath Kotur --- drivers/net/bnxt/bnxt_ethdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c index 22b52188b8..44056c9c4d 100644 --- a/drivers/net/bnxt/bnxt_ethdev.c +++ b/drivers/net/bnxt/bnxt_ethdev.c @@ -1611,6 +1611,7 @@ static void bnxt_drv_uninit(struct bnxt *bp) bnxt_free_link_info(bp); bnxt_free_parent_info(bp); bnxt_uninit_locks(bp); + bnxt_free_rep_info(bp); rte_memzone_free((const struct rte_memzone *)bp->tx_mem_zone); bp->tx_mem_zone = NULL; @@ -5903,7 +5904,6 @@ bnxt_uninit_resources(struct bnxt *bp, bool reconfig_dev) bnxt_free_flow_stats_info(bp); bnxt_free_switch_domain(bp); - bnxt_free_rep_info(bp); rte_free(bp->ptp_cfg); bp->ptp_cfg = NULL; return rc; -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:29.027508578 +0000 +++ 0060-net-bnxt-fix-representor-info-freeing.patch 2022-11-03 09:27:25.477424454 +0000 @@ -1 +1 @@ -From 5fdf25bd5531b3cb267201272c259ba4d0a32ca5 Mon Sep 17 00:00:00 2001 +From 8a78fa6b597477fb827334da3017f442621e2710 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 5fdf25bd5531b3cb267201272c259ba4d0a32ca5 ] + @@ -13 +14,0 @@ -Cc: stable@dpdk.org @@ -23 +24 @@ -index 2b5279f32c..3dfe9efc09 100644 +index 22b52188b8..44056c9c4d 100644 @@ -26 +27 @@ -@@ -1654,6 +1654,7 @@ static void bnxt_drv_uninit(struct bnxt *bp) +@@ -1611,6 +1611,7 @@ static void bnxt_drv_uninit(struct bnxt *bp) @@ -34 +35 @@ -@@ -5978,7 +5979,6 @@ bnxt_uninit_resources(struct bnxt *bp, bool reconfig_dev) +@@ -5903,7 +5904,6 @@ bnxt_uninit_resources(struct bnxt *bp, bool reconfig_dev)