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 A40C6A034F for ; Wed, 10 Nov 2021 07:52:18 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9A8E540142; Wed, 10 Nov 2021 07:52:18 +0100 (CET) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2042.outbound.protection.outlook.com [40.107.92.42]) by mails.dpdk.org (Postfix) with ESMTP id 9A6A340142 for ; Wed, 10 Nov 2021 07:52:16 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QArOu8nxlDJfcCAWyeLJLmfZLf3L++Ls+33AnkHZ6bz3n3k2MNWuqwZj5aA/UlVXQqa1oL+Yo1hT1K9Ok7oSAfnvC/VpRH6VFpjg/ROyN75ZI2vhQFTuS02XN2gDCRGeiAEyFB0eOTzjda7QDZomsz5xcunAoDMNYuwBVw/aD7zALaQpGyafagmMdPZWNXOkMZsTlFNxhdkWOWpiXpNapdfAyHgXO0gYF6qroFG8y7teopxRhqpaYwLS++fTZQmpTZi8upl2fS3CkSVFdddSbmwt0raepM4hITjK2vhSm6U2IUfGw4TzIfRhfZB7ip4z1umr3S7huGpklGMH87ZYtQ== 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=1k2ezuhzBkF4juCz1Vthf0eb+sWlvHASj51T9MJrsU0=; b=GvcqcGhq3oovB0KilwCSTVqQTfOvTM4op8B+E4lm2NjiXn0Zpy7XEnWGe6GMkw6pA1dgfXttVQJayD6klqrGz8Dq0ldPjPsCnR859rxvGj+R1ErdJiX6eYRAWoQjLhMLk6iINmqMYEaXtjWjHCS3APXSt/F1v92np96Js2epmGzJUR/+yBjwI/jgy3WSnWdvkLc6BMjM7zAnGScJyl2ROvxk811yMMFJApSwI+iVqHdTDSqF1F5zsLZ8n2oSD7ZtomHe+9tVv+kixHZiFi/Q2He+mB3BI++rNocM0R5zInHSlXSpe4KQ9q8doqVFxQO3eJtvD0ukLbclrtnUZt1lMg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=dpdk.org 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=1k2ezuhzBkF4juCz1Vthf0eb+sWlvHASj51T9MJrsU0=; b=oyP+47uCeIkFD4zV2ttRL51SkFG+LJ5NV4BmXX1x+lkKrx+sqBHnK2OjFAvYBx4v/zm59SQCQ3EYVIEeJO2FQoV3qfgfSWYkIQhXoG/gBNe12YF30jn6t1Itc+XjWyhRULQ+C99sZ/oIdjCYYmRJVBfr1F48YnJTuAw0tuNrKXnTQLbYd9JC07dbqoTTyW1IpRJVMj7NSFMAxZqpDAG9N8aBlQ8gNhWK3gi9J5z3SZuL+UK8oHB9U87NFHd7oNVNDDL3og+LcgEeinNInOTkZmphoOMqWljXDQ3dssui7KRbnSz6ovS+clvgcR5P5Cw94HP846fiwRqeTZsmMdBG3Q== Received: from BN9PR03CA0954.namprd03.prod.outlook.com (2603:10b6:408:108::29) by BY5PR12MB4275.namprd12.prod.outlook.com (2603:10b6:a03:20a::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.15; Wed, 10 Nov 2021 06:52:14 +0000 Received: from BN8NAM11FT023.eop-nam11.prod.protection.outlook.com (2603:10b6:408:108:cafe::71) by BN9PR03CA0954.outlook.office365.com (2603:10b6:408:108::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.11 via Frontend Transport; Wed, 10 Nov 2021 06:52:14 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) 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.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 BN8NAM11FT023.mail.protection.outlook.com (10.13.177.103) 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:52:13 +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:52:06 +0000 From: Xueming Li To: Dmitry Kozlyuk CC: Luca Boccassi , Matan Azrad , "dpdk stable" Date: Wed, 10 Nov 2021 14:30:59 +0800 Message-ID: <20211110063216.2744012-176-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: 138721b6-cc42-447d-7cf2-08d9a416a085 X-MS-TrafficTypeDiagnostic: BY5PR12MB4275: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:9508; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: SIuGxOnT37EauD3y+qvpvtE8NDK+ZLsHDOyLtsLEt3SpV5qpR58VLVb93Bs2ABtHxynSqBvi1B762XdBc2V+eWrvpp2AHaPLseM3GbRsl+Ri21q6rwOZbO9p1VJRb7eQY9kWlzBplf0t9+aMIeow6160A3rE09ZBi8y0pRfxEXdUSCWSAYx94X/cDc8EY5szTrgsiqCL082sMfvNE7+3AI+WAzaGvBQNUg0bp2eF1wQFt7B0yTZgeWlePj48GC0z5d/ozr/SPISCzYjSOKL6hG1N4NK40Yb4OF0aqATiA9XqukuZBx6aS6AlK/YI3YMCq32MHNMt4lFUNPAi9NDMC27Q1SzEtEBhcmNTZZx9+FUvLs6u9WnoJDxJVOe31k15UgmyE+pD/3q+n40viPNN+WzydkEerXGK+Pgae0P6BJkzMkcXAdzBPbyu4QymIOheDR1CWjcsaXgTkazKnQKYURkZDJMj13KwVpSBwW5Hwdy1ONnVVtLaSPssr+cg86fqsfMTLl1vxpDynZoHOCK7FgB2+muTCL3b+MlNtwUbEa+82rNNZ0eD03kUYuiQF9wfL27B7o+F5ZUOkRwNmwer0lTla3oVMVHzRHkw36xx2JQ4AaVfEP0yhFudvvFMoSSoJ9TbdJT7WJf9jWWfhaU2PUSnXhfTZH2q5FMd1FJhSCGHcAFYtjefsKf102N7kHV3fb22s6TAPkTKiFJSUnhQ1Cf1bnpNa0M2Q9MyrPDKJdBddObP0N5BCcSUvGiJu2t9zyiEMJTtwmYp5ucaQf72pDe1OdQJKxlUPDehR7k6c6du83iEqMIlKiCliQOfHRqjJSUVLXlWYrpijGs0xhKP3g== 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)(2616005)(8936002)(508600001)(1076003)(6286002)(16526019)(83380400001)(316002)(7696005)(6636002)(966005)(356005)(4326008)(36756003)(336012)(4001150100001)(6666004)(6862004)(8676002)(5660300002)(426003)(55016002)(37006003)(26005)(70206006)(53546011)(36906005)(54906003)(70586007)(47076005)(2906002)(7636003)(36860700001)(186003)(86362001)(82310400003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Nov 2021 06:52:13.3007 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 138721b6-cc42-447d-7cf2-08d9a416a085 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: BN8NAM11FT023.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR12MB4275 Subject: [dpdk-stable] patch 'net/mlx5: fix Rx queue resource cleanup' 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/9820d23a935266e158b02e125e81b388ff4161bb Thanks. Xueming Li --- >From 9820d23a935266e158b02e125e81b388ff4161bb Mon Sep 17 00:00:00 2001 From: Dmitry Kozlyuk Date: Mon, 18 Oct 2021 20:24:56 +0300 Subject: [PATCH] net/mlx5: fix Rx queue resource cleanup Cc: Xueming Li [ upstream commit 9ec1ceab76a82bc7c95343ed99312893a66ce217 ] mlx5_rxq_start() allocates rxq_ctrl->obj and frees it on failure, but did not set it to NULL. Later mlx5_rxq_release() could not recognize this object is already freed and attempted to release its resources, resulting in a crash: Configuring Port 0 (socket 0) mlx5_common: Failed to create RQ using DevX mlx5_common: Can't create DevX RQ object. mlx5_net: Port 0 Rx queue 0 RQ creation failure. Segmentation fault Set rxq_ctrl->obj to NULL after it is freed to skip resource release. Fixes: 1260a87b2889 ("net/mlx5: share Rx control code") Signed-off-by: Dmitry Kozlyuk Acked-by: Matan Azrad --- drivers/net/mlx5/mlx5_trigger.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/mlx5/mlx5_trigger.c b/drivers/net/mlx5/mlx5_trigger.c index 33a98ee50c..98055efd50 100644 --- a/drivers/net/mlx5/mlx5_trigger.c +++ b/drivers/net/mlx5/mlx5_trigger.c @@ -180,6 +180,7 @@ mlx5_rxq_start(struct rte_eth_dev *dev) ret = priv->obj_ops.rxq_obj_new(dev, i); if (ret) { mlx5_free(rxq_ctrl->obj); + rxq_ctrl->obj = NULL; goto error; } DRV_LOG(DEBUG, "Port %u rxq %u updated with %p.", -- 2.33.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-11-10 14:17:09.703480734 +0800 +++ 0175-net-mlx5-fix-Rx-queue-resource-cleanup.patch 2021-11-10 14:17:01.987411803 +0800 @@ -1 +1 @@ -From 9ec1ceab76a82bc7c95343ed99312893a66ce217 Mon Sep 17 00:00:00 2001 +From 9820d23a935266e158b02e125e81b388ff4161bb Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 9ec1ceab76a82bc7c95343ed99312893a66ce217 ] @@ -20 +22,0 @@ -Cc: stable@dpdk.org @@ -29 +31 @@ -index ca43bd51aa..dacf7ff272 100644 +index 33a98ee50c..98055efd50 100644 @@ -32 +34 @@ -@@ -230,6 +230,7 @@ mlx5_rxq_start(struct rte_eth_dev *dev) +@@ -180,6 +180,7 @@ mlx5_rxq_start(struct rte_eth_dev *dev)