Initialization must be completed before calling _vdpa_register_device()
since it can connect the device to the vDPA bus, so requests can arrive
after that call.
So for example vdpasim_net_work(), which uses the net->*_stats variables,
can be scheduled before they are initialized.
Let's move _vdpa_register_device() to the end of vdpasim_net_dev_add()
and add a comment to avoid future issues.
Fixes:
|
||
|---|---|---|
| .. | ||
| alibaba | ||
| ifcvf | ||
| mlx5 | ||
| solidrun | ||
| vdpa_sim | ||
| vdpa_user | ||
| virtio_pci | ||
| Kconfig | ||
| Makefile | ||
| vdpa.c | ||