eal: fix bus name read for removal in multi-process
A crash may appear when removing some PCI devices because
dev->devargs is not always initialized. So use dev->bus instead of
dev->devargs->bus when building devargs string to remove a device.
Fixes: 244d513071
("eal: enable hotplug on multi-process")
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
This commit is contained in:
parent
9ffe2f4e18
commit
4dc3db031d
@ -387,7 +387,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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user