From 9ffe2f4e18e91b24a8890a88e62443f4183ce8a3 Mon Sep 17 00:00:00 2001 From: Qi Zhang Date: Mon, 22 Oct 2018 13:47:11 +0800 Subject: [PATCH] bus/vdev: fix uninitialized device bus Device bus should be initialized after bus scan. While it does not happened when scan vdev from secondary process, that cause segment fault at rte_dev_probe when call dev->bus->xxx. Fixes: cdb068f031c6 ("bus/vdev: scan by multi-process channel") Cc: stable@dpdk.org Signed-off-by: Qi Zhang Acked-by: Thomas Monjalon --- drivers/bus/vdev/vdev.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/bus/vdev/vdev.c b/drivers/bus/vdev/vdev.c index 06f3148439..688e31c212 100644 --- a/drivers/bus/vdev/vdev.c +++ b/drivers/bus/vdev/vdev.c @@ -221,6 +221,7 @@ insert_vdev(const char *name, const char *args, struct rte_vdev_device **p_dev) goto fail; } + dev->device.bus = &rte_vdev_bus; dev->device.devargs = devargs; dev->device.numa_node = SOCKET_ID_ANY; dev->device.name = devargs->name; -- 2.39.5