mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
virtio-devices: console: Skip device-writable output descriptors
The output queue handler read data from every descriptor without checking the write-only flag. The driver must not put device-writable buffers in the transmitq. Skip them with a warning. Signed-off-by: Rob Bradford <rbradford@meta.com> Assisted-by: Claude:claude-opus-4-6
This commit is contained in:
@@ -261,6 +261,10 @@ impl ConsoleEpollHandler {
|
||||
|
||||
while let Some(mut desc_chain) = trans_queue.pop_descriptor_chain(self.mem.memory()) {
|
||||
while let Some(desc) = desc_chain.next() {
|
||||
if desc.is_write_only() {
|
||||
warn!("Skipping device-writable descriptor on transmitq");
|
||||
continue;
|
||||
}
|
||||
if let Some(out) = &mut self.out {
|
||||
let mut buf: Vec<u8> = Vec::new();
|
||||
desc_chain
|
||||
|
||||
Reference in New Issue
Block a user