cloud-hypervisor/virtio-devices/src/vsock
Sebastien Boeuf c47ab55e99 virtio-devices: Forward correct evset in vsock muxer
When forwarding an epoll event from the unix muxer to the
targeted connection event handler, the eventset the connection
registered is forwarded instead of the actual epoll
operation (IN/OUT).

For example, if the connection was registered for EPOLLIN,
and receives an EPOLLOUT, the connection will actually handle
an EPOLLOUT.

This is the root cause of previous bug, which caused the
introduction of some workarounds (i.e: handling ewouldblock
when reading after receiving EPOLLIN, which should never happen).

When matching the connection, we retrieve and use the evset of
the connection instead of the one passed as a parameter.
The compiler does not complain for an unused variable because
it was first logged in a debug! statement.

This is an unfortunate naming mistake that caused a lot of problems.

Fixes #3497

Signed-off-by: Eduard Kyvenko <eduard.kyvenko@gmail.com>
Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2022-01-04 12:05:01 +00:00
..
csm Move Cloud Hypervisor to virtio-queue crate 2021-10-22 11:38:55 +02:00
unix virtio-devices: Forward correct evset in vsock muxer 2022-01-04 12:05:01 +00:00
device.rs Move Cloud Hypervisor to virtio-queue crate 2021-10-22 11:38:55 +02:00
mod.rs Move Cloud Hypervisor to virtio-queue crate 2021-10-22 11:38:55 +02:00
packet.rs Move Cloud Hypervisor to virtio-queue crate 2021-10-22 11:38:55 +02:00