mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2024-11-25 05:03:05 +00:00
5b456d31f9
When vhost-user front-end send a vhost-user message via Unix domain socket, a message header is sent first with optional attached files. Then, a message body is sent as a separate packet if necessary. However, the existing implementation blocks only before a message header coming and assumed that the message body is ready when the header comes. So, there was a race and `handle_request` could return `EAGAIN`. This CL splits SlaveReqHandler::handle_request() into recv_header() and process_message() so a caller can wait between the header and the additional payload. On VVU, we shouldn't wait before receiving the payloads because the proxy device forwards a header and its message body together. So we check the protocol in needs_wait_for_payload(). BUG=b:237891754 TEST=Run vhost-user block on Linux TEST=Run vhost-user block on Windows TEST=Run VVU block on Linux Change-Id: I35af3eb0e706cb005bf697397698e01e272b0704 Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3863050 Reviewed-by: Daniel Verkamp <dverkamp@chromium.org> Reviewed-by: Alexandre Courbot <acourbot@chromium.org> Reviewed-by: Noah Gold <nkgold@google.com> Commit-Queue: Keiichi Watanabe <keiichiw@chromium.org> |
||
---|---|---|
.. | ||
depot_tools@268d645853 | ||
libslirp-rs | ||
minigbm@ef852e007c | ||
minijail@77c59db8ff | ||
virglrenderer@4770f706db | ||
vmm_vhost |