From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2B15FA04F5 for ; Wed, 11 Dec 2019 22:29:26 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1B0D61BDFD; Wed, 11 Dec 2019 22:29:26 +0100 (CET) Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) by dpdk.org (Postfix) with ESMTP id 9E6831BE83 for ; Wed, 11 Dec 2019 22:29:24 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576099764; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=gib6KjSBmspHaxIojs84ycFNKxDg+V4HjXUEVEuZFwU=; b=L6ei6zCTCyYgkVsQxMsq6VBbfAYvmE9MwWE4mtVcFAFbU4dkWNY3ejD3lVe2QoNvgrymG1 6u/t+l/GICWt+Baj4Vcx/7u1HNi8FazCJwaGDHjeCxiSaHoN4Vk7aijFfGDxYiIzMEKiad S+xO/UyBJeYRyucUNgFY9O4KRimlvPo= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-326-I5YmvnLPOriSiRVXBkplqw-1; Wed, 11 Dec 2019 16:29:22 -0500 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id 9CB75801E7A; Wed, 11 Dec 2019 21:29:21 +0000 (UTC) Received: from rh.redhat.com (ovpn-116-64.ams2.redhat.com [10.36.116.64]) by smtp.corp.redhat.com (Postfix) with ESMTP id 96E5510013A1; Wed, 11 Dec 2019 21:29:20 +0000 (UTC) From: Kevin Traynor To: Xiao Wang Cc: Xiaolong Ye , dpdk stable Date: Wed, 11 Dec 2019 21:26:57 +0000 Message-Id: <20191211212702.27851-65-ktraynor@redhat.com> In-Reply-To: <20191211212702.27851-1-ktraynor@redhat.com> References: <20191211212702.27851-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-MC-Unique: I5YmvnLPOriSiRVXBkplqw-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Subject: [dpdk-stable] patch 'net/ifc: check VFIO query error' has been queued to LTS release 18.11.6 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: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to LTS release 18.11.6 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/17/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. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasi= ng (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/kevintraynor/dpdk-stable-queue This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable-queue/commit/cf40f1ba3b49ec975d= aaed9b3eba13abbcf44e3b Thanks. Kevin. --- >From cf40f1ba3b49ec975daaed9b3eba13abbcf44e3b Mon Sep 17 00:00:00 2001 From: Xiao Wang Date: Tue, 26 Nov 2019 09:59:31 -0500 Subject: [PATCH] net/ifc: check VFIO query error [ upstream commit ac466a1d6c7892cc835e1ccbcdc83336c2f44701 ] It's possible that we fail to get the IOMMU group of ifcvf device, this patch adds a check on the return value. Coverity issue: 349894 Fixes: a3f8150eac6d ("net/ifcvf: add ifcvf vDPA driver") Signed-off-by: Xiao Wang Reviewed-by: Xiaolong Ye --- drivers/net/ifc/ifcvf_vdpa.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/net/ifc/ifcvf_vdpa.c b/drivers/net/ifc/ifcvf_vdpa.c index 698d14f88..eb4773a5a 100644 --- a/drivers/net/ifc/ifcvf_vdpa.c +++ b/drivers/net/ifc/ifcvf_vdpa.c @@ -113,5 +113,5 @@ ifcvf_vfio_setup(struct ifcvf_internal *internal) =09char devname[RTE_DEV_NAME_MAX_LEN] =3D {0}; =09int iommu_group_num; -=09int i; +=09int i, ret; =20 =09internal->vfio_dev_fd =3D -1; @@ -120,6 +120,10 @@ ifcvf_vfio_setup(struct ifcvf_internal *internal) =20 =09rte_pci_device_name(&dev->addr, devname, RTE_DEV_NAME_MAX_LEN); -=09rte_vfio_get_group_num(rte_pci_get_sysfs_path(), devname, +=09ret =3D rte_vfio_get_group_num(rte_pci_get_sysfs_path(), devname, =09=09=09&iommu_group_num); +=09if (ret <=3D 0) { +=09=09DRV_LOG(ERR, "%s failed to get IOMMU group", devname); +=09=09return -1; +=09} =20 =09internal->vfio_container_fd =3D rte_vfio_container_create(); --=20 2.21.0 --- Diff of the applied patch vs upstream commit (please double-check if non-= empty: --- --- -=092019-12-11 21:24:17.764362709 +0000 +++ 0065-net-ifc-check-VFIO-query-error.patch=092019-12-11 21:24:12.7476495= 64 +0000 @@ -1 +1 @@ -From ac466a1d6c7892cc835e1ccbcdc83336c2f44701 Mon Sep 17 00:00:00 2001 +From cf40f1ba3b49ec975daaed9b3eba13abbcf44e3b Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit ac466a1d6c7892cc835e1ccbcdc83336c2f44701 ] + @@ -11 +12,0 @@ -Cc: stable@dpdk.org @@ -20 +21 @@ -index 9c562def0..da4667ba5 100644 +index 698d14f88..eb4773a5a 100644 @@ -23 +24 @@ -@@ -137,5 +137,5 @@ ifcvf_vfio_setup(struct ifcvf_internal *internal) +@@ -113,5 +113,5 @@ ifcvf_vfio_setup(struct ifcvf_internal *internal) @@ -30 +31 @@ -@@ -144,6 +144,10 @@ ifcvf_vfio_setup(struct ifcvf_internal *internal) +@@ -120,6 +120,10 @@ ifcvf_vfio_setup(struct ifcvf_internal *internal)