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 44F12A034F for ; Wed, 10 Nov 2021 07:43:40 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3998D4068B; Wed, 10 Nov 2021 07:43:40 +0100 (CET) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2049.outbound.protection.outlook.com [40.107.236.49]) by mails.dpdk.org (Postfix) with ESMTP id 3E2E940E03 for ; Wed, 10 Nov 2021 07:43:39 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CgqZ0SjsUAB+yq9cUJfaXYxhaSOUulhOOXZV2j/9LEjLIhm6ao0atgsrXey+X7/bO3CBts00PQX7MEbqoJG3Mla2t54OpxMZhWiNzwuObIVqudNAzNHomJB+1yPsDmWuxPfr3Mih9/nrWULE+VgDLC0VR2wSLQWZ0D85KVo2jYtpNIXHE99Kx4UlKNb/24F7nqUgeWdbsvPDexVPC7JRa+cUnNrhwMumKiYXHxNglcXplLM3BKiol9NTDLyu0Jrbecji1F+sSQ7JeH/Iznf96lQS9OVw8WgQoa8ydqVDDzTuZtBDRGgieKcTH0G7n1MMUV7K/HYJm9ZI4/A5HRogIA== 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=3U2UJ1XWh8NUOlhKYe0ZknNlsUoAAQhKVfzmnsimXm8=; b=a1nZL9NjRTjlsM3QZ23YoX9FytUEomqmwl1v8ddXnla8XWyclooYQlCVUP23g84n2oOiUsVhiI3fPREph8im+rRW88218JrhaWd7GqxccGe2J9zzhY8Iazf+/vKXCaqKbJezL/kPFhMbMU9rxEuwQYf+R5KcoXe1P5y+DvWuEjAgCpN03GH4E/jYgtVprk6xq6wNrN4uTsn53KmfMGopJTQjXvOAMeYjoh93G0HBw4CBqbMgZ1wGlg5aJcutfbLKyTjUqAAZqAgHaeUpgOX4fDzXOeqVtY/5ZYDmTUU7BR+8foYn/TgCmhWx/bujCQed2PFp88EbGWN5N0udevrEVQ== 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=3U2UJ1XWh8NUOlhKYe0ZknNlsUoAAQhKVfzmnsimXm8=; b=soMaz2LTqEVfKIC+I+jMkKsBGI4OqzAl2q95F5FIcHIGs1mUwlraTD8XdR02y5G5uvLkgXEwbq3qIokRuZD87mioZBi8f/HUPJMxfmmC1d12+wc6aS5Z4mMWXnJBswc0r8ObYgYVdFtvD/S/kogp/lbKkwfpMDEf6PlLv0dK25udREu10JDU9bQ8bQZk5rRlq9wdWHXLOetdFCRSzWa1qU/7LsFP6tT/zGsi4MNJ9RC78SwCzOqms+Fs36qUtrpbUJros1pNeBuluSXBnBlWaFdcx51c8LfuT0+BJkNo1r+dNN+wW4334mAx52FF56snYe02TCU91/T7/sNxtNaj4g== Received: from DM6PR06CA0089.namprd06.prod.outlook.com (2603:10b6:5:336::22) by CH0PR12MB5372.namprd12.prod.outlook.com (2603:10b6:610:d7::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.11; Wed, 10 Nov 2021 06:43:37 +0000 Received: from DM6NAM11FT004.eop-nam11.prod.protection.outlook.com (2603:10b6:5:336:cafe::7f) by DM6PR06CA0089.outlook.office365.com (2603:10b6:5:336::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.15 via Frontend Transport; Wed, 10 Nov 2021 06:43:37 +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 DM6NAM11FT004.mail.protection.outlook.com (10.13.172.217) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4669.10 via Frontend Transport; Wed, 10 Nov 2021 06:43:37 +0000 Received: from nvidia.com (172.20.187.6) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Wed, 10 Nov 2021 06:43:35 +0000 From: Xueming Li To: Bing Zhao CC: Luca Boccassi , Matan Azrad , "dpdk stable" Date: Wed, 10 Nov 2021 14:29:45 +0800 Message-ID: <20211110063216.2744012-102-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.6] 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: 528035e5-a3d6-47b6-f0d5-08d9a4156cbe X-MS-TrafficTypeDiagnostic: CH0PR12MB5372: 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: OSPA+mGKlROHR85ENkM6PB6PQr7G9wpj685r/idSfN1/WRufCrt1fuhsq7uVoEuqHz51WXHgLDzPWVh1UlA1VnmDyLts41+QLoKBSwlxBtzAJYFhsjae1rEden3GXm0Q2AuOCnUEoKf6YiHAiZCXqkazWuBYSNwgP6K5gh/lwocsqqxZ7EYJA+PsiDIM7fU9Fx5aav89ZQi/NyxUJxXBN/r3CcE53Xo9OiNzSK5x3r3EOMcWz4DHrh5piZv69uTj5jwnfZLSmcQV3uFepgjDrxxnno8wLMPbkH+ynR42bf2eT48kM5PU/imxvZcaek9h8KRpL5nOdUCNqvIgEa2J93y72QwkaUxypGHEj6GvbvbeZb5Q3JqnqCbj9QOzGxR+maq5kDRqKpxDJuD2F5NL5p5NnDcPoUqeiTHbGcrhwjgeeIOA7Lj4U8YV4H3Hga5krwJAwcVnsn1HsGUbzSGrV8DSzNIWoyqIwXAU/G2TnkxpZTJhJeANhoc980fQB5uhD/pG+VfwYnDfF31qCYWbyMbL8wZuOAz8iiN1QvHWs8vCpEfCKCPmi7dYoiT7LJ1fTuU35DrRSu0lfLtzypY9RDMj+i9JlNjJ79JE7psPge+zM4iRINlE6jBJpCamvrVp0a7OBEmAfSLZjBGwQCImHJTKSTFFrTLYvXuuqoQAhKbpaGyXFdRMXOiQyDl90CP9V5s0UtSE2Rh9PfkqnaUH3sRv2c/GusLAjUsyHYN9GenWZwVQTjgM/dL30G7iLbmJaTZEj16wNABKpClyGMT6vBlvEAwiR7Z1c7gW4SJBDCg4zoVcmM4lfRgMUiNQg2FBmMxY9hA0O1Z9cuYDUY0Rwg== 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)(26005)(336012)(186003)(83380400001)(82310400003)(55016002)(356005)(7696005)(16526019)(4326008)(6636002)(2906002)(5660300002)(53546011)(2616005)(36756003)(47076005)(37006003)(86362001)(54906003)(4001150100001)(7636003)(316002)(6666004)(426003)(36860700001)(508600001)(6286002)(70586007)(1076003)(8936002)(70206006)(6862004)(966005)(8676002); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Nov 2021 06:43:37.4157 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 528035e5-a3d6-47b6-f0d5-08d9a4156cbe 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: DM6NAM11FT004.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH0PR12MB5372 Subject: [dpdk-stable] patch 'net/mlx5: fix flow tables double release' 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/3df90648847edefb376cc3cd8fcafd37d3c1d943 Thanks. Xueming Li --- >From 3df90648847edefb376cc3cd8fcafd37d3c1d943 Mon Sep 17 00:00:00 2001 From: Bing Zhao Date: Tue, 28 Sep 2021 07:08:51 +0300 Subject: [PATCH] net/mlx5: fix flow tables double release Cc: Xueming Li [ upstream commit a6b57ff48708e659ad35aed499c32805de85d3cd ] In the function mlx5_alloc_shared_dr(), there are various reasons to result in a failure and error clean up process. While in the caller of mlx5_dev_spawn(), once there is a error occurring after the mlx5_alloc_shared_dr(), the mlx5_os_free_shared_dr() is called to release all the resources. To prevent a double release, the pointers of the resources should be checked before the releasing and set to NULL after done. In the mlx5_free_table_hash_list(), after the releasing, the pointer was missed to set to NULL and a double release may cause a crash. By setting the tables pointer to NULL as done for other resources, the double release and crash could be solved. Fixes: 54534725d2f3 ("net/mlx5: fix flow table hash list conversion") Signed-off-by: Bing Zhao Acked-by: Matan Azrad --- drivers/net/mlx5/mlx5.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c index cb984debcc..48588d4cd5 100644 --- a/drivers/net/mlx5/mlx5.c +++ b/drivers/net/mlx5/mlx5.c @@ -1130,6 +1130,7 @@ mlx5_free_table_hash_list(struct mlx5_priv *priv) if (!sh->flow_tbls) return; mlx5_hlist_destroy(sh->flow_tbls); + sh->flow_tbls = NULL; } /** -- 2.33.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-11-10 14:17:06.499231911 +0800 +++ 0101-net-mlx5-fix-flow-tables-double-release.patch 2021-11-10 14:17:01.864079479 +0800 @@ -1 +1 @@ -From a6b57ff48708e659ad35aed499c32805de85d3cd Mon Sep 17 00:00:00 2001 +From 3df90648847edefb376cc3cd8fcafd37d3c1d943 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit a6b57ff48708e659ad35aed499c32805de85d3cd ] @@ -22 +24,0 @@ -Cc: stable@dpdk.org @@ -31 +33 @@ -index aa428366b3..45ccfe2784 100644 +index cb984debcc..48588d4cd5 100644 @@ -34 +36 @@ -@@ -1372,6 +1372,7 @@ mlx5_free_table_hash_list(struct mlx5_priv *priv) +@@ -1130,6 +1130,7 @@ mlx5_free_table_hash_list(struct mlx5_priv *priv)