mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
When Request::parse failed, for example for a chain containing only the head descriptor, process_queue_submit returned the error via `?`. The caller process_queue_submit_and_signal swallowed Error::RequestParsing with a warn! and returned Ok(()), but queue.iter().next() had already consumed the head from the avail ring. The head was never written to the used ring, so the descriptor slot leaked and the queue could be stalled by a guest that keeps submitting malformed chains. Handle the parse error in line. Log a warning, add the head to the used ring with len 0, reenable notifications, and continue draining the queue. A VIRTIO_BLK_S_IOERR status cannot be written because the status descriptor address is exactly what failed to parse. Signed-off-by: Anatol Belski <anbelski@linux.microsoft.com>