* [dpdk-dev] [PATCH] bus/vdev: fix uninitialized device bus
@ 2018-10-22 5:47 Qi Zhang
2018-10-22 7:02 ` Thomas Monjalon
0 siblings, 1 reply; 3+ messages in thread
From: Qi Zhang @ 2018-10-22 5:47 UTC (permalink / raw)
To: thomas, ferruh.yigit; +Cc: dev, Qi Zhang, stable
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 <qi.z.zhang@intel.com>
---
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 0142fb2c8..7d658fdf7 100644
--- a/drivers/bus/vdev/vdev.c
+++ b/drivers/bus/vdev/vdev.c
@@ -222,6 +222,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.13.6
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH] bus/vdev: fix uninitialized device bus
2018-10-22 5:47 [dpdk-dev] [PATCH] bus/vdev: fix uninitialized device bus Qi Zhang
@ 2018-10-22 7:02 ` Thomas Monjalon
2018-10-22 10:36 ` Thomas Monjalon
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Monjalon @ 2018-10-22 7:02 UTC (permalink / raw)
To: Qi Zhang; +Cc: ferruh.yigit, dev, stable
22/10/2018 07:47, Qi Zhang:
> 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 <qi.z.zhang@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH] bus/vdev: fix uninitialized device bus
2018-10-22 7:02 ` Thomas Monjalon
@ 2018-10-22 10:36 ` Thomas Monjalon
0 siblings, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2018-10-22 10:36 UTC (permalink / raw)
To: Qi Zhang; +Cc: dev, ferruh.yigit, stable
22/10/2018 09:02, Thomas Monjalon:
> 22/10/2018 07:47, Qi Zhang:
> > 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 <qi.z.zhang@intel.com>
>
> Acked-by: Thomas Monjalon <thomas@monjalon.net>
Applied, thanks
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-10-22 10:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-22 5:47 [dpdk-dev] [PATCH] bus/vdev: fix uninitialized device bus Qi Zhang
2018-10-22 7:02 ` Thomas Monjalon
2018-10-22 10:36 ` Thomas Monjalon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).