From: Tetsuya Mukawa Date: Wed, 8 Jul 2015 10:34:43 +0000 (+0900) Subject: pci: close file descriptor of uio configuration X-Git-Tag: spdx-start~8852 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=d428dab038318f0f07939eae94744ee43a47591a;p=dpdk.git pci: close file descriptor of uio configuration When pci_uio_unmap_resource() is called, a file descriptor that is used for uio configuration should be closed. Signed-off-by: Tetsuya Mukawa Acked-by: Stephen Hemminger Acked-by: Bernard Iremonger Acked-by: David Marchand --- diff --git a/lib/librte_eal/linuxapp/eal/eal_pci_uio.c b/lib/librte_eal/linuxapp/eal/eal_pci_uio.c index 5d3354de09..34316b6efd 100644 --- a/lib/librte_eal/linuxapp/eal/eal_pci_uio.c +++ b/lib/librte_eal/linuxapp/eal/eal_pci_uio.c @@ -464,8 +464,12 @@ pci_uio_unmap_resource(struct rte_pci_device *dev) /* close fd if in primary process */ close(dev->intr_handle.fd); - dev->intr_handle.fd = -1; + + /* close cfg_fd if in primary process */ + close(dev->intr_handle.uio_cfg_fd); + dev->intr_handle.uio_cfg_fd = -1; + dev->intr_handle.type = RTE_INTR_HANDLE_UNKNOWN; } #endif /* RTE_LIBRTE_EAL_HOTPLUG */