[dpdk-dev] [PATCH] eal: fix NULL device argument pointer reference
Qi Zhang
qi.z.zhang at intel.com
Mon Oct 22 08:15:16 CEST 2018
dev->devargs is not initialized for PCI device, so use dev->bus to
replace dev->devargs->bus to avoid segment fault when hotplug remove
a PCI device.
Fixes: 244d5130719c ("eal: enable hotplug on multi-process")
Signed-off-by: Qi Zhang <qi.z.zhang at intel.com>
---
lib/librte_eal/common/eal_common_dev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/librte_eal/common/eal_common_dev.c b/lib/librte_eal/common/eal_common_dev.c
index d4b1ea70d..9d456d320 100644
--- a/lib/librte_eal/common/eal_common_dev.c
+++ b/lib/librte_eal/common/eal_common_dev.c
@@ -393,7 +393,7 @@ rte_dev_remove(struct rte_device *dev)
return -ENOENT;
}
- ret = build_devargs(dev->devargs->bus->name, dev->name, "", &devargs);
+ ret = build_devargs(dev->bus->name, dev->name, "", &devargs);
if (ret != 0)
return ret;
--
2.13.6
More information about the dev
mailing list