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 F367FA0C58 for ; Tue, 31 Aug 2021 22:39:04 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E85764013F; Tue, 31 Aug 2021 22:39:04 +0200 (CEST) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2060.outbound.protection.outlook.com [40.107.220.60]) by mails.dpdk.org (Postfix) with ESMTP id 2CAD94013F; Tue, 31 Aug 2021 22:39:04 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AzvHjzQsi84iSEZoR9a+pScjST39DFgwQEyCBRPX3gCY04u+by/nFL8bvAQxof3FOeQKm10pVvImX/7X953hdXgGeAVMusIFSo8IKjiM8bMKxnehBCg+SGxDk06/0wvHhGDTE/16ZG2WOExTuMkVFPIgiIQx0YAQPU3IHiYGNgQKsB4qofPnyksmGvthHoIMNtobE4LLn/T/3f/SJG7JYJluK7BhPoO9cabQGvGb5wPaAAGx+E6iJ5X8VD8ptpWrvjvoPQ1KtfcZdnl1PctI7tFAXJejh6xmv/xIJi/wkXAfWbwjmpMWraggGf8mxW6/wIUgZz6o2hurfCdeR6vG4A== 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-SenderADCheck; bh=5+BVazJxwqHVbRSHqJylYrqX8YexIn+dmJHjyv9NfQw=; b=VX0VFbkzHRsFpK5e92JVN+so0oaHgC41h2W+Tu6I40ivl8zbsMQxg+8yC9sHlNqkE+v/MK8GMRpQKmHqRxa1YUoeu5AvJ56VkV7VkDsNlT42TCyy4ve2QFBUkoewZYHFzhaDHRIp+iAq3kmdCMOftLDoatJeSt7VBGbb+mWk/tnjgoe/zvKhG4AP2io8t6KZlYifIR5+5kfF82SLOxaNlbOJGxWcGv3JbXNPS0EtMslz9GdosTCfN2ZRxFqiaiw0kbT3yPbH5o4Y+nWrUlfcZscAJ5fkR/xDSIj5xc7oBA1PF5sK2Tf+LZZVtZ/fCBuoD6UulVUzUJhsqMyCVALWKg== 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=none 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=5+BVazJxwqHVbRSHqJylYrqX8YexIn+dmJHjyv9NfQw=; b=SUQ45D5Z/mUgn0sPi1iTBpjFKd13HFY0cnONRhM3dSMfi5QAB4s+EufWOfTKrFCiFpI40u4IG9WNll/7JfrSn2dc2C2N4k2p43j8XHcEK5Q0vTllmo6DSHSXjpYJxDnwkHU9pLBx9IySPmIRjSE9JKtLAKCGm3V3RvJ60eQ0dNPCcHV8UWWPycbomEHFAP/7jpu8qP21W2PaeOuDadUQXVfSGu6Lm0ecsT1ybimM3sohWZOlETxlU6ndzID1iNpz3Y0na9Gq2hNtcHRq2Nk6HwRk7we+tDTGbj2tcYs3eh2yL6Wj07ButTbu8UDMIHnCFfG5OlCUBslIOdghcMpdHQ== Received: from CO2PR18CA0066.namprd18.prod.outlook.com (2603:10b6:104:2::34) by BY5PR12MB3923.namprd12.prod.outlook.com (2603:10b6:a03:194::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4457.20; Tue, 31 Aug 2021 20:39:02 +0000 Received: from CO1NAM11FT043.eop-nam11.prod.protection.outlook.com (2603:10b6:104:2:cafe::b9) by CO2PR18CA0066.outlook.office365.com (2603:10b6:104:2::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4478.17 via Frontend Transport; Tue, 31 Aug 2021 20:39:02 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; 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 CO1NAM11FT043.mail.protection.outlook.com (10.13.174.193) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4478.19 via Frontend Transport; Tue, 31 Aug 2021 20:39:01 +0000 Received: from DRHQMAIL107.nvidia.com (10.27.9.16) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 31 Aug 2021 20:39:01 +0000 Received: from nvidia.com (172.20.187.5) by DRHQMAIL107.nvidia.com (10.27.9.16) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 31 Aug 2021 20:38:59 +0000 From: Michael Baum To: CC: Matan Azrad , Thomas Monjalon , "Ori Kam" , Date: Tue, 31 Aug 2021 23:38:38 +0300 Message-ID: <20210831203838.3411249-1-michaelba@nvidia.com> X-Mailer: git-send-email 2.25.1 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 DRHQMAIL107.nvidia.com (10.27.9.16) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 91bc7893-562d-4245-c200-08d96cbf5df0 X-MS-TrafficTypeDiagnostic: BY5PR12MB3923: X-LD-Processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2089; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 8HfOfyyIkjjZEohOmTMhZ73kg2sM9a0eZbQRaXOk8sOpyJtNNaCoG51E904lh/o93+xmH3uNhoGqtJKj1tolPQaZSOtsLq3lCKeY7sguLcYIzGlFwsgQnaXZXWeCIJqBgXSPdjY0h6Fp+nw9DqnnocDEyAnDx8sbtbM9gmPjpKPVzr6RWfn5rOPiWwyVQ0YexWDk0zzlOkjiLobT/g3fG26r9KBoCKcNCR/LB5/mo9WwSd3UZQp0TUxpy2W2qsZ/UpdOoLxbJ5DwWzNf8dfv1LvhivKGk5XHslYAeiZ4pTGawrusXOHf9i3hUh/0itE+Yh66llKP3lWm4ABHzMqLkGbSLB1h0R24jNzmRc9w+yVP4RqaeFMUyHoR69d1721BeUwaUxOIlIzFsSLXoOvRU8PVnHnr/x/Y6lpWDGkHcx/9GVhHI/kp4h8eNE6hBtTPN99NcwvZl2s6ReEH3ioL0CM8gtM+7Nr5ffsV0zysEj7GBaKyLT9ItHfZC//S3lFzk5y1hpvmzn+/+e5bFcGm3bAdNzbslTdEg/getC8fLg37HH4hk/ZIZq6p6hux6YuCjb+CwAsVwBQ6NXUR12tqxb+rhfeopPjE6bbfW8BtPEiecpQRFdVKF7iSqSCR4cIDuWz7vkMYKgdJgbhdk76vfy09uE8pU+0/koBDY+zxJfSelC0Q3Eq4BP+XB7i0gNFQAzAmOghbgZez3vr5rzuf8Q== 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)(46966006)(36840700001)(36906005)(316002)(55016002)(83380400001)(508600001)(186003)(6666004)(36756003)(7636003)(70206006)(6286002)(1076003)(54906003)(2616005)(70586007)(82310400003)(16526019)(336012)(7696005)(426003)(8676002)(26005)(86362001)(8936002)(4326008)(5660300002)(2906002)(47076005)(6916009)(4744005)(356005)(36860700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Aug 2021 20:39:01.8426 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 91bc7893-562d-4245-c200-08d96cbf5df0 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: CO1NAM11FT043.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR12MB3923 Subject: [dpdk-stable] [PATCH] regex/mlx5: fix RegEx probing error flow 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" In RegEx device probing, there is register read trying after context device creation. When the reading fails, the context device was not freed what caused a memory leak. Free it. Fixes: f324162e8e77 ("regex/mlx5: support combined rule file") Cc: stable@dpdk.org Signed-off-by: Michael Baum --- drivers/regex/mlx5/mlx5_regex.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regex/mlx5/mlx5_regex.c b/drivers/regex/mlx5/mlx5_regex.c index f17b6df47f..8866a4d0c6 100644 --- a/drivers/regex/mlx5/mlx5_regex.c +++ b/drivers/regex/mlx5/mlx5_regex.c @@ -171,7 +171,7 @@ mlx5_regex_dev_probe(struct rte_device *rte_dev) MLX5_RXP_CSR_IDENTIFIER, &val); if (ret) { DRV_LOG(ERR, "CSR read failed!"); - return -1; + goto dev_error; } if (val == MLX5_RXP_BF2_IDENTIFIER) priv->is_bf2 = 1; -- 2.25.1