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 0CA0D45BB6 for ; Wed, 23 Oct 2024 23:19:09 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 06D1D40261; Wed, 23 Oct 2024 23:19:09 +0200 (CEST) Received: from mail-wr1-f44.google.com (mail-wr1-f44.google.com [209.85.221.44]) by mails.dpdk.org (Postfix) with ESMTP id 8C2E340261 for ; Wed, 23 Oct 2024 23:19:07 +0200 (CEST) Received: by mail-wr1-f44.google.com with SMTP id ffacd0b85a97d-37d447de11dso117974f8f.1 for ; Wed, 23 Oct 2024 14:19:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1729718347; x=1730323147; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=w5DOPEOGbX5NgBCwp3WK+QQ7uODvdna/RJxt2tE8Jeo=; b=bnx1Eg8RGbN7WRMk/VczlYeeRbkdC7tuCeu4aYV+d8PIz3H0SEEwHueFDNTOOECrVP wrislhNeR6Ty3Yaj9Q0DwvcdDYHJpxW0cZfHb8IxTVS9nIvd+rBzN92uFAqJfsjBDR9K sUIlQ5oNFz+ksK0LbY1LnWJZNmIFbfTlDQm6IyNED/im8LM1uL2Q436x9aJzukqxat7Q nYYz+W7wsVUssnLjPfX22GGwquabVPLKedFhlQm3T3V2IKiMbOrFH3UlmMh5vFxedU6X 3NPQ2XolGlFaOQyGIMEY3aVrC1aasadBJnwSD4D61bFh7ZNQJNXN8CkIRkibuVqVWWj8 pmMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729718347; x=1730323147; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=w5DOPEOGbX5NgBCwp3WK+QQ7uODvdna/RJxt2tE8Jeo=; b=HeUnj6WaWEuaVJWXB5aYqB6TFjHUfKniDV6ceyxxiTQL0zk5jmZ+BF2vjpZDCvXX2H /QvREeiAUuF+6WJnFfaZ95/LyeHqIOFKDJp9zd3yfXllWc8LZSCgHtP5jTOlL9QR0P3W ABH4tS6OUAMEQCqL8thx+DGdlTDhjCaCaDY0+p7Io36HXptRdPYjAGaSzL2HRoEDZKjt VqegKasS/VbC+OmhsNQDLysf+z/ybEq/TeqprDs3aqvpHtzDsOk9SaK+WVqdVM7DpuNc LUnE+FQG3J4c452EoDttPQgmRLd5bZf0d0PrQ80TKgFxqMhpNtGqMbbEkzvYjahSAK5Q zVhA== X-Forwarded-Encrypted: i=1; AJvYcCUDr1PGG9Yhj2FayQQFUmTY/Me55zJedaNf1rZpOpbYiN2E1HcTW0wlZ7Y54Bn1S0avmUsP3lc=@dpdk.org X-Gm-Message-State: AOJu0YydJBOKuNEEgC1Z69tt1Tb3mKy0ZfqZU91gHCeWqT+fAPC3BI6c wrDlDY8CH4ooZ95X3lmI9u+WTJOQU/RKwhL5b4/Xxk8pNjV1WhLvV1Cfaw== X-Google-Smtp-Source: AGHT+IE61f32POY6KgPTIHX9ncrE1HGsW/dcJ9i3iHCbRAmLqkeDQpEN8NyXMTVSRLtLp4OkaBe23A== X-Received: by 2002:adf:e7d0:0:b0:37d:238:5a84 with SMTP id ffacd0b85a97d-37efcf0c790mr2744031f8f.15.1729718347002; Wed, 23 Oct 2024 14:19:07 -0700 (PDT) Received: from localhost ([2a01:4b00:d036:ae00:21cd:def0:a01d:d2aa]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37ee0a4856fsm9765368f8f.33.2024.10.23.14.19.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Oct 2024 14:19:06 -0700 (PDT) From: luca.boccassi@gmail.com To: Kaiwen Deng Cc: Bruce Richardson , dpdk stable Subject: patch 'net/iavf: fix crash when link is unstable' has been queued to stable release 22.11.7 Date: Wed, 23 Oct 2024 22:16:14 +0100 Message-ID: <20241023211704.1216956-34-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241023211704.1216956-1-luca.boccassi@gmail.com> References: <20241023211704.1216956-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 22.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 10/25/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://github.com/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/90adb751e4a7a555f0ec996d7f80e951d6384b95 Thanks. Luca Boccassi --- >From 90adb751e4a7a555f0ec996d7f80e951d6384b95 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 [ 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 aeffb07cca..0164dddcb0 100644 --- a/drivers/net/iavf/iavf_vchnl.c +++ b/drivers/net/iavf/iavf_vchnl.c @@ -246,8 +246,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.45.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-10-23 22:16:41.808356976 +0100 +++ 0034-net-iavf-fix-crash-when-link-is-unstable.patch 2024-10-23 22:16:40.471941652 +0100 @@ -1 +1 @@ -From 57ed9ca61f44ffc3801f55c749347bd717834008 Mon Sep 17 00:00:00 2001 +From 90adb751e4a7a555f0ec996d7f80e951d6384b95 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 57ed9ca61f44ffc3801f55c749347bd717834008 ] + @@ -14 +15,0 @@ -Cc: stable@dpdk.org @@ -23 +24 @@ -index 6d5969f084..69420bc9b6 100644 +index aeffb07cca..0164dddcb0 100644 @@ -26 +27 @@ -@@ -255,8 +255,8 @@ iavf_read_msg_from_pf(struct iavf_adapter *adapter, uint16_t buf_len, +@@ -246,8 +246,8 @@ iavf_read_msg_from_pf(struct iavf_adapter *adapter, uint16_t buf_len,