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 91933A0A0E for ; Mon, 10 May 2021 18:14:58 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8B67C40140; Mon, 10 May 2021 18:14:58 +0200 (CEST) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2083.outbound.protection.outlook.com [40.107.94.83]) by mails.dpdk.org (Postfix) with ESMTP id 3AE9C410FE for ; Mon, 10 May 2021 18:14:57 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=d+hnSR5uDHiH297SHUMjwwU97B3w4U+Pl7zVfeFTPfDL/VhjGO7SBQ7HK6ds2m1/bhmjiwU0yrlEEBU6EvPUQeJ0ZKBHmrXqZJCLmAXFt9Pz3qCkP2GjL2BYTrh83w/ehHeJs9S/jRdfMjZF8U7salRkddkoew2Icly/PZWc1OUCNBeLV8hghdJgt8Hen4/NeUhcZP53xiapnzDpXlPukY+DGp4KoC1FFeWMXyoATtYt2rSPRk8U9hRF9YWSsRALThV7ZVYtbXJwDkF6DUdvEhTWe+ed3aK/ZJsCFH4YiH4XFot3IGfw3hyNe4BqvALQTXPD8N1US/VzBMwd+OTzbw== 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=BKf4YYbQgiRsHnJiSGR1sp4d5vlOryJBagjaT3tOVcY=; b=ls2SnDAyQzcbFXYyH8HoStFKm6YZb5HkpTvb7JqS54kwFNdLfH43qSMtHZLL1JknRYMuxYyTTJOsor40L7R8MDCJBLS/CBKRUNPLczNx5ts4i7eBXHvdUJc/50MugmSNMSMV8cdidBiib/Hc37Xr2OcixS75Nj+8DGao3U75JTJYXMJeh0I6HPZ8CteiBDL3e5tNRPDV6tesgSr354miEmWURspW6jltTvGHyA7kQrAOSWcWD3QjXifOG5zCqRYMlxzlW4cYOdnZ2RcVw92WYOSvbHhKq+eFkZDzqU2BNwH8KofRa2LuoJAkTzC9HvfcsonaRPCU1zL0X99TPoRxRw== 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=none 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=BKf4YYbQgiRsHnJiSGR1sp4d5vlOryJBagjaT3tOVcY=; b=V8DrZZkDLeJxw1jiqeXWBW69kJW/2sQxlMTZ0VbEosO++aXKeccYRKBNEKYVzwKJmH+rJn0PDBgL/0WuI/HifB6pCPcijv75Ad3CEtQKaOpDdu2et/6vRMhAN7zBrwy7DkSSiDeh+rhtjiGmsSR1v7hdp/W4kC3t7UCyh9WL4ipOk9PuI8d6Aw8BPFO4wbgFpqlIQlOaNREoP6RQuLITf8kjR9va75fsGuMBaaPGYYaHLcAMmd27TO7LKMGMFiAVLSzC1VifBGmJMCqicAXarCEqeu8ItIcq9BluEn2sYs9EmeuHwilowYWsSRW3gYtnkW9+RyzeAM9NuNCOCkyiCQ== Received: from MW4PR03CA0333.namprd03.prod.outlook.com (2603:10b6:303:dc::8) by BL0PR12MB2385.namprd12.prod.outlook.com (2603:10b6:207:4d::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.25; Mon, 10 May 2021 16:14:55 +0000 Received: from CO1NAM11FT060.eop-nam11.prod.protection.outlook.com (2603:10b6:303:dc:cafe::69) by MW4PR03CA0333.outlook.office365.com (2603:10b6:303:dc::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.25 via Frontend Transport; Mon, 10 May 2021 16:14:55 +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 CO1NAM11FT060.mail.protection.outlook.com (10.13.175.132) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4108.25 via Frontend Transport; Mon, 10 May 2021 16:14:55 +0000 Received: from nvidia.com (172.20.145.6) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 10 May 2021 16:14:52 +0000 From: Xueming Li To: Yunjian Wang CC: Luca Boccassi , Viacheslav Ovsiienko , dpdk stable Date: Tue, 11 May 2021 00:01:07 +0800 Message-ID: <20210510160258.30982-118-xuemingl@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210510160258.30982-1-xuemingl@nvidia.com> References: <20210510160258.30982-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.145.6] X-ClientProxiedBy: HQMAIL111.nvidia.com (172.20.187.18) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 1127f069-7696-44d0-e0a1-08d913cebfe7 X-MS-TrafficTypeDiagnostic: BL0PR12MB2385: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:10000; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: kPJANYqjhpIct9CsQyYJeq3GrUH/IYc8rJr370RxYi/PhyZMjzBcszGQFjiIMnHpGWIX+TG1ox0XzBxgDCDbPEBpcd2G9bQIXGEJz2yMUMMB12rNs7EgvTXmcjUoyPlN3cYqOGdBCt28dMik+TOcJO6IYspcVVz/hly4kXgqJFlPOBaMlpinA+2yUuQXLIzBukJAB22VixjUzWku/3kwg4jOMvVtultg86Jm4opx5Er7vgVIcE/tSoUaRCxCe8qgbdM7JT290yzq+FZesTowL6WrQt1VmS9nXGUWzattG464u/6Y/bQc+pOoi1cWNCRihLGAM+QkPpjT23fytCQBYUjhHsOITGDlerTVsVFS2UKUVKIDRQi4DKauZ4WbEdYVVVYEBFkrPTgIIMpYsYNTg3osugA3nkSGOe7pH2q9keMbZHajP+9wHkCNBkyHTqbfZKx3HEQWnWSRRPQcXU2i9lQ384RYj+OzAg5lqMBWdm5yUuZO86A7mjQLarGqwSNcTOaMOMG1I/Uo2DlG9MfOXdF6ihWYNe6PgQzmtgYECAVvTg8LIASbsgTlQAvsPEFsR6jSnVt9PBVzgMBU85Ur6cJsfs0ERUHVUuGW4vVDW3Zticat83UF3kJjQQtRMXUSDGFDltD/vZ6gTG0KUzuClUcn87wOFPRjly+ZXn82ewH4QMV+esmug0ebnRz9t0fN4SDFQ51whwXKmywjFmNKhayduUhR2YfCIcL4xwSNXzf9gfP5pLS237TWeRqlpFHVl6MReOrT/pfndBEfKMvnJQ== 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)(396003)(39860400002)(346002)(376002)(136003)(46966006)(36840700001)(82740400003)(47076005)(16526019)(186003)(316002)(26005)(54906003)(36756003)(5660300002)(6286002)(86362001)(7696005)(966005)(6666004)(478600001)(36906005)(2906002)(8936002)(70206006)(6916009)(426003)(8676002)(53546011)(55016002)(7636003)(356005)(36860700001)(70586007)(4326008)(2616005)(1076003)(82310400003)(83380400001)(336012); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 May 2021 16:14:55.2471 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1127f069-7696-44d0-e0a1-08d913cebfe7 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: CO1NAM11FT060.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR12MB2385 Subject: [dpdk-stable] patch 'net/mlx5: fix using flow tunnel before null check' has been queued to stable release 20.11.2 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.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 05/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/f90c6e9d4139a54551d6487b72ec851cdf5fabfa Thanks. Xueming Li --- >From f90c6e9d4139a54551d6487b72ec851cdf5fabfa Mon Sep 17 00:00:00 2001 From: Yunjian Wang Date: Sat, 27 Mar 2021 10:44:09 +0800 Subject: [PATCH] net/mlx5: fix using flow tunnel before null check Cc: Luca Boccassi [ upstream commit ed9726ce83eb7562b3dcfaf0ee10647ed816ae4a ] Coverity flags that 'ctx->tunnel' variable is used before it's checked for NULL. This patch fixes this issue. Coverity issue: 366201 Fixes: 868d2e342cf3 ("net/mlx5: fix tunnel offload hub multi-thread protection") Signed-off-by: Yunjian Wang Acked-by: Viacheslav Ovsiienko --- drivers/net/mlx5/mlx5_flow.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c index d574ad78c7..2fe810c6b5 100644 --- a/drivers/net/mlx5/mlx5_flow.c +++ b/drivers/net/mlx5/mlx5_flow.c @@ -7609,10 +7609,11 @@ static void get_tunnel_miss(struct rte_eth_dev *dev, void *x) rte_spinlock_unlock(&thub->sl); ctx->tunnel = mlx5_flow_tunnel_allocate(dev, ctx->app_tunnel); - ctx->tunnel->refctn = 1; rte_spinlock_lock(&thub->sl); - if (ctx->tunnel) + if (ctx->tunnel) { + ctx->tunnel->refctn = 1; LIST_INSERT_HEAD(&thub->tunnels, ctx->tunnel, chain); + } } -- 2.25.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-05-10 23:59:29.674522700 +0800 +++ 0119-net-mlx5-fix-using-flow-tunnel-before-null-check.patch 2021-05-10 23:59:26.520000000 +0800 @@ -1 +1 @@ -From ed9726ce83eb7562b3dcfaf0ee10647ed816ae4a Mon Sep 17 00:00:00 2001 +From f90c6e9d4139a54551d6487b72ec851cdf5fabfa Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Luca Boccassi + +[ upstream commit ed9726ce83eb7562b3dcfaf0ee10647ed816ae4a ] @@ -11 +13,0 @@ -Cc: stable@dpdk.org @@ -20 +22 @@ -index 7ab7f63264..c347f8130e 100644 +index d574ad78c7..2fe810c6b5 100644 @@ -23 +25 @@ -@@ -7881,10 +7881,11 @@ static void get_tunnel_miss(struct rte_eth_dev *dev, void *x) +@@ -7609,10 +7609,11 @@ static void get_tunnel_miss(struct rte_eth_dev *dev, void *x)