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 D810F45CE3 for ; Mon, 11 Nov 2024 07:35:07 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CC74C40685; Mon, 11 Nov 2024 07:35:07 +0100 (CET) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2050.outbound.protection.outlook.com [40.107.94.50]) by mails.dpdk.org (Postfix) with ESMTP id 8A2AC40685 for ; Mon, 11 Nov 2024 07:35:06 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ODqs2lRYqbnEcHo0ah/JxNLe3lrrFXJVxZKhOIeytaVMBAbPWauoU8zDkX+7dOvAL55mZG/M0efqJvKX8xovcWYfDHI4dMxZwkDodAOL8llxKlHgPYDeD4f6I8O/aCuh9FNgd9RLgG2bvhZ+HuDSUQLl5NDfFZRpe/EXxbkV5n+2VA3COjvU2O8R9NOkzqje5+70jTQzKVFA0wBbDSp6NyZQryw14wukqQ6H5oQQDcrf0lRg2TN7O0TcthQ9l6pk1Snyz9fneYdDydzpn2NAK3eEnLV2pNbFdMI6Qi3qnfoH4jDIRlOPNVK+F4ezd1W9ksWY/jUtnHaUDWCqnCaioA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=1l63xV7Kr4Y/crZaqAdspHRjOD3GgweYinBzg7aOMIA=; b=m9yG4iYYB1XZ8g1Hx+kRfwtQllOeXfD1NZAmNmBCmn5WRlRyvhWlvHpZFNw6A/jvL6epyFOSm3/0/TvwX8E4TUBjVnqq7e4ymzpKFO4uMhJurpWcur285KlSrDBAmXRR68FVMwFw/fXul3DjLvRxFHoWYhaL+HhL/QxchHSfRF/u4i0XJHoLoIbRSR32/TELzUCtE+qeCcS9pKQtuWDb35mP4fKEQT1vD1HGHp3UJFvxfJQeWtvpdjO9Mrm1y5y++lTHETJjnIZ8U+FWxLBmzw/m8RASd7TQJ1PD9woINB7jpiAoYosw95TJJTWlwJhRG4fHtNFjkOQwnvvuJOoLgQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=intel.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) 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=1l63xV7Kr4Y/crZaqAdspHRjOD3GgweYinBzg7aOMIA=; b=rt4TNRF1hgo1ZJIOy6QvELYHRM5s1rR0isrjxtnW+Q+hE4mCjIsouPg2C/kE/kTMSxYWDOyHTEZV1ty3v9+a/KEXLmLbmysm3B1jRecGI7qMTyKXV+spWiJ8VdHTNH83nKNdnz+PcZ1n/pvEYO6PiybuKp+854GawKb3Co5pk/JYGIL+/QVy2fDxPn/UCHIZqmc+BVifgTdR+z8BXfxu+pZ91YtBMD3G+7Ykl3J2vxtJTA6W9FkH597mpfRZOpbRt/GR7djQ5Y+00vbJY9iBUWnxJDE+hlK+Cfrn0sjJMx6m0+USLBgF5voq4DStC4BoczQagIKE39EpI3xEXARxSA== Received: from BL1PR13CA0444.namprd13.prod.outlook.com (2603:10b6:208:2c3::29) by MW3PR12MB4459.namprd12.prod.outlook.com (2603:10b6:303:56::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8137.29; Mon, 11 Nov 2024 06:35:03 +0000 Received: from BN2PEPF000044A5.namprd04.prod.outlook.com (2603:10b6:208:2c3:cafe::bb) by BL1PR13CA0444.outlook.office365.com (2603:10b6:208:2c3::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8158.12 via Frontend Transport; Mon, 11 Nov 2024 06:35:03 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) 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.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by BN2PEPF000044A5.mail.protection.outlook.com (10.167.243.104) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8158.14 via Frontend Transport; Mon, 11 Nov 2024 06:35:02 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Sun, 10 Nov 2024 22:34:48 -0800 Received: from nvidia.com (10.126.231.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Sun, 10 Nov 2024 22:34:46 -0800 From: Xueming Li To: Kaiwen Deng CC: , Bruce Richardson , "dpdk stable" Subject: patch 'net/iavf: fix crash when link is unstable' has been queued to stable release 23.11.3 Date: Mon, 11 Nov 2024 14:27:41 +0800 Message-ID: <20241111062847.216344-56-xuemingl@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241111062847.216344-1-xuemingl@nvidia.com> References: <20241111062847.216344-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.231.35] X-ClientProxiedBy: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN2PEPF000044A5:EE_|MW3PR12MB4459:EE_ X-MS-Office365-Filtering-Correlation-Id: 9b0d6e32-782f-48d7-0f00-08dd021af944 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|376014|82310400026|36860700013; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?oHZi9rLdHY+wA32QMBJf5qv8wq5ON7JfLi+pm5xUplw+YSoPK2Q/4bDg7xwk?= =?us-ascii?Q?wqf2oS/1UL47Pefg+KL/xLvJsLKtC58Puuvpm51jfMmXAjtr50tf3sX4ioRr?= =?us-ascii?Q?v9diIwHjzZK/dTSyFsY+gO40AIniZgtpWInlptoDTm/jOKmUCLTKy0ixPhOu?= =?us-ascii?Q?Uj0FrpLXtO7PVcQYEQBn59V+T9nbqLieePCvaPEMknscEtNisMsh1ViA81fy?= =?us-ascii?Q?/PQ5m6YZYAVej2PHic5qg3F4CJ3JVeM1FVhei0SK5XjGPhizYt25mjAZGLnw?= =?us-ascii?Q?cAECIRnK6wBCgN7ApNwdcs94U/ddOiomeVkcxXSjqs/u88zW7fYTFPV9Yf11?= =?us-ascii?Q?oycQ+narTBi1dNwqJ8pvqeInGiDMuH3B8W7Itlj92wcypePRcg9V+Hjs5bFL?= =?us-ascii?Q?H04CrTbx+4jB1dlpV5lxgHK9ysLMjv9KUU8LqxAzk4ILFyAteMuLvZWMAOxb?= =?us-ascii?Q?56Bo+Tn9ku4H4H/t14lwI7G1gmsc8gUUSEuQmPcUY5Lvk0P5d0Au76UooUJR?= =?us-ascii?Q?K9bltUz/OLDra2Ug3EaraWzU/AvoffKN7TxNwNXVuxx/5z1OZ+T+wRpYdEio?= =?us-ascii?Q?PeACzuYquKYzXiVhN91a4Y5m+xoRgutP6hphmqiC08srISTJBn139F8HuzMy?= =?us-ascii?Q?zDjEGKaFyj8USbki43WjA35U15AZA+mr3NKqCt/s5O4y8uZlPEuqgwwb6dLK?= =?us-ascii?Q?1SJBivTP0KVIIEaNSYEcXrfCiz8xgNb5TtzE/ZL6v9NjQ2/oaZwqlavij9QE?= =?us-ascii?Q?hlMWe4/Anxcpn0KiIJ68dil3ZuxmqY52y8LjKo7BrlkPkADuhaXW1GRplT8M?= =?us-ascii?Q?YmaK6Bbo/B1z4zfNUhG1FUoP++IrDQxY2HIg0gt06ZWLA0FdW0RsJhUte6U6?= =?us-ascii?Q?lsmNpV1fa+b1YC4CL93n9MvG4fLCJdefkkVpK8x3+d6h3tRDfaBknUsCU53z?= =?us-ascii?Q?b7Y92eqySZW7RjMzPdtIIVZ36uag/EU+35fu4QL3XMnPsb1voS8mo+XzjOlq?= =?us-ascii?Q?2ehIZNLWiZnzj6q380IEfXUiEaFOLBGDFPt+7QNj0QbtL2x3wOXjF2GiJXMm?= =?us-ascii?Q?bFRYzc8IkOR39vOdK7dWwS+rrLbmcrGqoD8xzX2wzzu4AP5zbR2GQBtBi/bK?= =?us-ascii?Q?frgkdMnVC2GrjQFJl2ntFi9pjOeUlFbAbaJzmIXF2cna3nDVNPddutiuDpDd?= =?us-ascii?Q?I2mTbDUySlx+qj1+EweAT17oi1/XuPogrUnKKaQVyS9S8AtocFK0CakCX2zF?= =?us-ascii?Q?WGHUAm/XicksuQXqRov3Ao6iHKg7lNUXZQh0sCZGNDAQlXhcHRPmX2qFuSK+?= =?us-ascii?Q?H3pEpjWiMItNW+9St/hGCYvXgBjNZA+UREcxCMGkWQ4uDLy3Qm/IwyKj2pi/?= =?us-ascii?Q?D1lV3sD8f7S+/bY5jcdUDtLwAyQGe7VVsHOKifxpHG1D8ZJXhQ=3D=3D?= X-Forefront-Antispam-Report: CIP:216.228.117.160; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge1.nvidia.com; CAT:NONE; SFS:(13230040)(1800799024)(376014)(82310400026)(36860700013); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Nov 2024 06:35:02.8839 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9b0d6e32-782f-48d7-0f00-08dd021af944 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.160]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN2PEPF000044A5.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW3PR12MB4459 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 23.11.3 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/30/24. 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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging This queued commit can be viewed at: https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=97d79944ae2b5d5736b2e7f5e643b4ad6be5fc25 Thanks. Xueming Li --- >From 97d79944ae2b5d5736b2e7f5e643b4ad6be5fc25 Mon Sep 17 00:00:00 2001 From: Kaiwen Deng Date: Tue, 6 Aug 2024 08:35:27 +0800 Subject: [PATCH] net/iavf: fix crash when link is unstable Cc: Xueming Li [ upstream commit 57ed9ca61f44ffc3801f55c749347bd717834008 ] Physical link instability may cause a core dump because unstable physical links can result in a large number of link change events. Some of these events may be captured by vf before vf resources are allocated, and that will result in a core dump. This commit will check if vf_res is invalid before dereferencing it. Fixes: 5e03e316c753 ("net/iavf: handle virtchnl event message without interrupt") Signed-off-by: Kaiwen Deng Acked-by: Bruce Richardson --- drivers/net/iavf/iavf_vchnl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/iavf/iavf_vchnl.c b/drivers/net/iavf/iavf_vchnl.c index 1111d30f57..8ca104c04e 100644 --- a/drivers/net/iavf/iavf_vchnl.c +++ b/drivers/net/iavf/iavf_vchnl.c @@ -255,8 +255,8 @@ iavf_read_msg_from_pf(struct iavf_adapter *adapter, uint16_t buf_len, case VIRTCHNL_EVENT_LINK_CHANGE: vf->link_up = vpe->event_data.link_event.link_status; - if (vf->vf_res->vf_cap_flags & - VIRTCHNL_VF_CAP_ADV_LINK_SPEED) { + if (vf->vf_res != NULL && + vf->vf_res->vf_cap_flags & VIRTCHNL_VF_CAP_ADV_LINK_SPEED) { vf->link_speed = vpe->event_data.link_event_adv.link_speed; } else { -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-11-11 14:23:07.770511586 +0800 +++ 0055-net-iavf-fix-crash-when-link-is-unstable.patch 2024-11-11 14:23:05.132192839 +0800 @@ -1 +1 @@ -From 57ed9ca61f44ffc3801f55c749347bd717834008 Mon Sep 17 00:00:00 2001 +From 97d79944ae2b5d5736b2e7f5e643b4ad6be5fc25 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 57ed9ca61f44ffc3801f55c749347bd717834008 ] @@ -14 +16,0 @@ -Cc: stable@dpdk.org @@ -23 +25 @@ -index 6d5969f084..69420bc9b6 100644 +index 1111d30f57..8ca104c04e 100644