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 C283CA0A02 for ; Mon, 17 May 2021 18:12:08 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BCA0240041; Mon, 17 May 2021 18:12:08 +0200 (CEST) Received: from youngberry.canonical.com (youngberry.canonical.com [91.189.89.112]) by mails.dpdk.org (Postfix) with ESMTP id DC0E640041 for ; Mon, 17 May 2021 18:12:07 +0200 (CEST) Received: from 2.general.paelzer.uk.vpn ([10.172.196.173] helo=Keschdeichel.fritz.box) by youngberry.canonical.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1lifqh-0007ge-LB; Mon, 17 May 2021 16:12:07 +0000 From: Christian Ehrhardt To: Wenjun Wu Cc: dpdk stable Date: Mon, 17 May 2021 18:07:45 +0200 Message-Id: <20210517161039.3132619-36-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210517161039.3132619-1-christian.ehrhardt@canonical.com> References: <20210517161039.3132619-1-christian.ehrhardt@canonical.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/ice: check some functions return' has been queued to stable release 19.11.9 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 19.11.9 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/19/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/cpaelzer/dpdk-stable-queue This queued commit can be viewed at: https://github.com/cpaelzer/dpdk-stable-queue/commit/b9d78a6c6fe9706c243dcce0a55825da708b1124 Thanks. Christian Ehrhardt --- >From b9d78a6c6fe9706c243dcce0a55825da708b1124 Mon Sep 17 00:00:00 2001 From: Wenjun Wu Date: Fri, 26 Feb 2021 15:22:00 +0800 Subject: [PATCH] net/ice: check some functions return [ upstream commit 32667f5b48a371cd65c35d26c61ea293745e1b44 ] Fix unchecked return values reported by coverity. Coverity issue: 349907 Fixes: 03a05924dad0 ("net/ice: support device-specific DDP package loading") Signed-off-by: Wenjun Wu --- drivers/net/ice/ice_ethdev.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c index 5469f6b1cd..2fc3b71544 100644 --- a/drivers/net/ice/ice_ethdev.c +++ b/drivers/net/ice/ice_ethdev.c @@ -1800,8 +1800,14 @@ ice_pkg_file_search_path(struct rte_pci_device *pci_dev, char *pkg_file) pos = ice_pci_find_next_ext_capability(pci_dev, PCI_EXT_CAP_ID_DSN); if (pos) { - rte_pci_read_config(pci_dev, &dsn_low, 4, pos + 4); - rte_pci_read_config(pci_dev, &dsn_high, 4, pos + 8); + if (rte_pci_read_config(pci_dev, &dsn_low, 4, pos + 4) < 0) { + PMD_INIT_LOG(ERR, "Failed to read pci config space\n"); + return -1; + } + if (rte_pci_read_config(pci_dev, &dsn_high, 4, pos + 8) < 0) { + PMD_INIT_LOG(ERR, "Failed to read pci config space\n"); + return -1; + } snprintf(opt_ddp_filename, ICE_MAX_PKG_FILENAME_SIZE, "ice-%08x%08x.pkg", dsn_high, dsn_low); } else { @@ -1863,7 +1869,11 @@ static int ice_load_pkg(struct rte_eth_dev *dev) struct ice_adapter *ad = ICE_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private); - ice_pkg_file_search_path(pci_dev, pkg_file); + err = ice_pkg_file_search_path(pci_dev, pkg_file); + if (err) { + PMD_INIT_LOG(ERR, "failed to search file path\n"); + return err; + } file = fopen(pkg_file, "rb"); if (!file) { -- 2.31.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-05-17 17:40:30.966943880 +0200 +++ 0036-net-ice-check-some-functions-return.patch 2021-05-17 17:40:29.163809413 +0200 @@ -1 +1 @@ -From 32667f5b48a371cd65c35d26c61ea293745e1b44 Mon Sep 17 00:00:00 2001 +From b9d78a6c6fe9706c243dcce0a55825da708b1124 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 32667f5b48a371cd65c35d26c61ea293745e1b44 ] + @@ -10 +11,0 @@ -Cc: stable@dpdk.org @@ -18 +19 @@ -index 8999d441ac..9c9b84a938 100644 +index 5469f6b1cd..2fc3b71544 100644 @@ -21,2 +22,2 @@ -@@ -1663,8 +1663,14 @@ ice_pkg_file_search_path(struct rte_pci_device *pci_dev, char *pkg_file) - pos = rte_pci_find_ext_capability(pci_dev, RTE_PCI_EXT_CAP_ID_DSN); +@@ -1800,8 +1800,14 @@ ice_pkg_file_search_path(struct rte_pci_device *pci_dev, char *pkg_file) + pos = ice_pci_find_next_ext_capability(pci_dev, PCI_EXT_CAP_ID_DSN); @@ -38 +39 @@ -@@ -1727,7 +1733,11 @@ static int ice_load_pkg(struct rte_eth_dev *dev) +@@ -1863,7 +1869,11 @@ static int ice_load_pkg(struct rte_eth_dev *dev)