git.droids-corp.org
/
dpdk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
633e4c7
)
bus/pci: check VFIO reset ioctl error
author
Jonas Pfefferle
<jpf@zurich.ibm.com>
Thu, 26 Oct 2017 15:19:49 +0000
(17:19 +0200)
committer
Thomas Monjalon
<thomas@monjalon.net>
Thu, 26 Oct 2017 21:51:39 +0000
(23:51 +0200)
Check return value of device reset ioctl
Coverity issue: 195003
Fixes:
33604c31354a
("vfio: refactor PCI BAR mapping")
Signed-off-by: Jonas Pfefferle <jpf@zurich.ibm.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
drivers/bus/pci/linux/pci_vfio.c
patch
|
blob
|
history
diff --git
a/drivers/bus/pci/linux/pci_vfio.c
b/drivers/bus/pci/linux/pci_vfio.c
index
1a3c308
..
360eed3
100644
(file)
--- a/
drivers/bus/pci/linux/pci_vfio.c
+++ b/
drivers/bus/pci/linux/pci_vfio.c
@@
-339,7
+339,11
@@
pci_vfio_setup_device(struct rte_pci_device *dev, int vfio_dev_fd)
}
/* Reset the device */
- ioctl(vfio_dev_fd, VFIO_DEVICE_RESET);
+ if (ioctl(vfio_dev_fd, VFIO_DEVICE_RESET)) {
+ RTE_LOG(ERR, EAL, "Unable to reset device! Error: %d (%s)\n",
+ errno, strerror(errno));
+ return -1;
+ }
return 0;
}