]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
[bhyve] virtio-net: Do not allow receiving packets until features have been negotiated.
authorAleksandr Fedorov <afedorov@FreeBSD.org>
Thu, 17 Dec 2020 16:52:40 +0000 (16:52 +0000)
committerAleksandr Fedorov <afedorov@FreeBSD.org>
Thu, 17 Dec 2020 16:52:40 +0000 (16:52 +0000)
commitea57b2d7a80a256ca7c16b3df9906d9744ae44b6
tree7237a57d178eecced4f80999f498af9b0e8b2ceb
parent10720ae4db107ec96b72e62de7e430150b2541b9
[bhyve] virtio-net: Do not allow receiving packets until features have been negotiated.

Enforce the requirement that the RX callback cannot be called after a reset until the features have been negotiated.
This fixes a race condition where the receive callback is called during a device reset.

Reviewed by: vmaffione, grehan
Approved by: vmaffione (mentor)
Sponsored by: vstack.com
Differential Revision: https://reviews.freebsd.org/D27381
usr.sbin/bhyve/pci_virtio_net.c