From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 50C5F1B4AA for ; Thu, 29 Nov 2018 14:22:10 +0100 (CET) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B3D9AC058CB0; Thu, 29 Nov 2018 13:22:09 +0000 (UTC) Received: from ktraynor.remote.csb (ovpn-117-230.ams2.redhat.com [10.36.117.230]) by smtp.corp.redhat.com (Postfix) with ESMTP id 54CFA1001F50; Thu, 29 Nov 2018 13:22:08 +0000 (UTC) From: Kevin Traynor To: Tiwei Bie Cc: Maxime Coquelin , dpdk stable Date: Thu, 29 Nov 2018 13:20:15 +0000 Message-Id: <20181129132128.7609-15-ktraynor@redhat.com> In-Reply-To: <20181129132128.7609-1-ktraynor@redhat.com> References: <20181129132128.7609-1-ktraynor@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Thu, 29 Nov 2018 13:22:09 +0000 (UTC) Subject: [dpdk-stable] patch 'net/virtio: fix unchecked return value' has been queued to stable release 18.08.1 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Nov 2018 13:22:10 -0000 Hi, FYI, your patch has been queued to stable release 18.08.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 12/08/18. 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. If the code is different (ie: not only metadata diffs), due for example to a change in context or macro names, please double check it. Thanks. Kevin Traynor --- >>From 254dc4067fa088e5f7687231f9a0118b73d7bad5 Mon Sep 17 00:00:00 2001 From: Tiwei Bie Date: Wed, 7 Nov 2018 17:01:01 +0800 Subject: [PATCH] net/virtio: fix unchecked return value [ upstream commit ecfae1510edc1391285aa566a2d31e7eae8fc6d2 ] Coverity issue: 302861 Fixes: 6ba1f63b5ab0 ("virtio: support specification 1.0") Signed-off-by: Tiwei Bie Reviewed-by: Maxime Coquelin --- drivers/net/virtio/virtio_pci.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/net/virtio/virtio_pci.c b/drivers/net/virtio/virtio_pci.c index 6bd22e54a..027be68c9 100644 --- a/drivers/net/virtio/virtio_pci.c +++ b/drivers/net/virtio/virtio_pci.c @@ -611,7 +611,13 @@ virtio_read_caps(struct rte_pci_device *dev, struct virtio_hw *hw) break; case VIRTIO_PCI_CAP_NOTIFY_CFG: - rte_pci_read_config(dev, &hw->notify_off_multiplier, + ret = rte_pci_read_config(dev, + &hw->notify_off_multiplier, 4, pos + sizeof(cap)); - hw->notify_base = get_cfg_addr(dev, &cap); + if (ret != 4) + PMD_INIT_LOG(DEBUG, + "failed to read notify_off_multiplier, ret %d", + ret); + else + hw->notify_base = get_cfg_addr(dev, &cap); break; case VIRTIO_PCI_CAP_DEVICE_CFG: -- 2.19.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2018-11-29 13:11:35.395577918 +0000 +++ 0014-net-virtio-fix-unchecked-return-value.patch 2018-11-29 13:11:34.000000000 +0000 @@ -1,11 +1,12 @@ -From ecfae1510edc1391285aa566a2d31e7eae8fc6d2 Mon Sep 17 00:00:00 2001 +From 254dc4067fa088e5f7687231f9a0118b73d7bad5 Mon Sep 17 00:00:00 2001 From: Tiwei Bie Date: Wed, 7 Nov 2018 17:01:01 +0800 Subject: [PATCH] net/virtio: fix unchecked return value +[ upstream commit ecfae1510edc1391285aa566a2d31e7eae8fc6d2 ] + Coverity issue: 302861 Fixes: 6ba1f63b5ab0 ("virtio: support specification 1.0") -Cc: stable@dpdk.org Signed-off-by: Tiwei Bie Reviewed-by: Maxime Coquelin @@ -14,10 +15,10 @@ 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/net/virtio/virtio_pci.c b/drivers/net/virtio/virtio_pci.c -index 21110cd69..c8883c32e 100644 +index 6bd22e54a..027be68c9 100644 --- a/drivers/net/virtio/virtio_pci.c +++ b/drivers/net/virtio/virtio_pci.c -@@ -615,7 +615,13 @@ virtio_read_caps(struct rte_pci_device *dev, struct virtio_hw *hw) +@@ -611,7 +611,13 @@ virtio_read_caps(struct rte_pci_device *dev, struct virtio_hw *hw) break; case VIRTIO_PCI_CAP_NOTIFY_CFG: - rte_pci_read_config(dev, &hw->notify_off_multiplier,