diff options
author | Stefano Garzarella <sgarzare@redhat.com> | 2023-03-29 18:03:21 +0200 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2023-04-04 14:22:12 -0400 |
commit | 9da667e50c7e62266f3c2f8ad57b32fca40716b1 (patch) | |
tree | 7933e3ab1503d703ea62ac10c47ffc778548b97f /tools | |
parent | f0417e72add5aed5997092b6eb76298290d866c9 (diff) | |
download | linux-stable-9da667e50c7e62266f3c2f8ad57b32fca40716b1.tar.gz linux-stable-9da667e50c7e62266f3c2f8ad57b32fca40716b1.tar.bz2 linux-stable-9da667e50c7e62266f3c2f8ad57b32fca40716b1.zip |
vdpa_sim_net: complete the initialization before register the device
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: 0899774cb360 ("vdpa_sim_net: vendor satistics")
Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
Message-Id: <20230329160321.187176-1-sgarzare@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions