52bd03e969
When first attempt to configure a device with RX interrupt enabled fails
for some reason (e.g. because "Multiple intr vector not supported"),
second attempt to configure the device with RX interrupt disabled and
feature set unchanged will succeed but will leave virtio queues not
allocated. Accessing the queues will cause a segfault.
First attempt:
- virtio_dev_configure()
- virtio_init_device() is called to reinit the device because
"dev->data->dev_conf.intr_conf.rxq" is "1"
- virtio_configure_intr() fails and returns an error
- virtio_free_queues() frees previously allocated virtio queues
- virtio_init_device() fails and returns an error
- virtio_dev_configure() fails and returns an error
Second attempt:
- virtio_dev_configure()
- This time virtio_init_device() is not called, virtio queues
are not allocated
With this fix, reinit the device during configuration if virtio queues
are not allocated.
Fixes:
|
||
---|---|---|
.. | ||
virtio_user | ||
meson.build | ||
version.map | ||
virtio_ethdev.c | ||
virtio_ethdev.h | ||
virtio_logs.h | ||
virtio_pci_ethdev.c | ||
virtio_pci.c | ||
virtio_pci.h | ||
virtio_ring.h | ||
virtio_rxtx_packed_avx.h | ||
virtio_rxtx_packed_neon.h | ||
virtio_rxtx_packed.c | ||
virtio_rxtx_packed.h | ||
virtio_rxtx_simple_altivec.c | ||
virtio_rxtx_simple_neon.c | ||
virtio_rxtx_simple_sse.c | ||
virtio_rxtx_simple.c | ||
virtio_rxtx_simple.h | ||
virtio_rxtx.c | ||
virtio_rxtx.h | ||
virtio_user_ethdev.c | ||
virtio.c | ||
virtio.h | ||
virtqueue.c | ||
virtqueue.h |