From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id AF6941B94B for ; Fri, 11 Jan 2019 11:32:13 +0100 (CET) Received: from Internal Mail-Server by MTLPINE1 (envelope-from yskoh@mellanox.com) with ESMTPS (AES256-SHA encrypted); 11 Jan 2019 12:32:08 +0200 Received: from scfae-sc-2.mti.labs.mlnx (scfae-sc-2.mti.labs.mlnx [10.101.0.96]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id x0BAVjcb018586; Fri, 11 Jan 2019 12:32:07 +0200 From: Yongseok Koh To: Tiwei Bie Cc: Maxime Coquelin , dpdk stable Date: Fri, 11 Jan 2019 02:31:36 -0800 Message-Id: <20190111103142.21088-13-yskoh@mellanox.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190111103142.21088-1-yskoh@mellanox.com> References: <20190111103142.21088-1-yskoh@mellanox.com> Subject: [dpdk-stable] patch 'net/virtio: fix unchecked return value' has been queued to LTS release 17.11.5 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: Fri, 11 Jan 2019 10:32:14 -0000 Hi, FYI, your patch has been queued to LTS release 17.11.5 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 01/13/19. 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. Yongseok --- >>From 5fe500e3ddf31001d113b8937ae4f5cf1f2ec55d 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 89986c335..249ec6d3a 100644 --- a/drivers/net/virtio/virtio_pci.c +++ b/drivers/net/virtio/virtio_pci.c @@ -658,9 +658,15 @@ virtio_read_caps(struct rte_pci_device *dev, struct virtio_hw *hw) hw->common_cfg = get_cfg_addr(dev, &cap); 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: hw->dev_cfg = get_cfg_addr(dev, &cap); -- 2.11.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2019-01-11 02:29:11.594925472 -0800 +++ 0013-net-virtio-fix-unchecked-return-value.patch 2019-01-11 02:29:10.775983000 -0800 @@ -1,11 +1,12 @@ -From ecfae1510edc1391285aa566a2d31e7eae8fc6d2 Mon Sep 17 00:00:00 2001 +From 5fe500e3ddf31001d113b8937ae4f5cf1f2ec55d 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 89986c335..249ec6d3a 100644 --- a/drivers/net/virtio/virtio_pci.c +++ b/drivers/net/virtio/virtio_pci.c -@@ -614,9 +614,15 @@ virtio_read_caps(struct rte_pci_device *dev, struct virtio_hw *hw) +@@ -658,9 +658,15 @@ virtio_read_caps(struct rte_pci_device *dev, struct virtio_hw *hw) hw->common_cfg = get_cfg_addr(dev, &cap); break; case VIRTIO_PCI_CAP_NOTIFY_CFG: