[dpdk-dev,V8,2/3] igb_uio: fix device removal issuse for hotplug
Checks
Commit Message
when the hot plug out of the device, the uio resource have been
invalid, so to avoid the system hung, no need to do the invalid
operation in igb_uio pci release function.
Signed-off-by: Jeff Guo <jia.guo@intel.com>
---
lib/librte_eal/linuxapp/igb_uio/igb_uio.c | 6 ++++++
1 file changed, 6 insertions(+)
@@ -354,6 +354,12 @@ igbuio_pci_release(struct uio_info *info, struct inode *inode)
struct rte_uio_pci_dev *udev = info->priv;
struct pci_dev *dev = udev->pdev;
+ /* check if device have been remove before release */
+ if ((&dev->dev.kobj)->state_remove_uevent_sent == 1) {
+ pr_info("The device have been removed\n");
+ return -1;
+ }
+
/* disable interrupts */
igbuio_pci_disable_interrupts(udev);