From ff78eb8fb481cb773b8f5db340e5f4fbcd12ecb0 Mon Sep 17 00:00:00 2001 From: Rob Bradford Date: Wed, 6 May 2026 13:41:02 +0100 Subject: [PATCH] virtio-devices: balloon: Report used length of 0 for inflate/deflate The inflate and deflate queues carry device-readable PFN arrays: the driver writes them and the device only reads. The device never writes to the descriptor buffers, so the used ring entry should report 0 bytes written rather than the descriptor length. Signed-off-by: Rob Bradford Assisted-by: Claude:claude-opus-4-6 --- virtio-devices/src/balloon.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/virtio-devices/src/balloon.rs b/virtio-devices/src/balloon.rs index 70318a3ce..26728f03f 100644 --- a/virtio-devices/src/balloon.rs +++ b/virtio-devices/src/balloon.rs @@ -322,7 +322,7 @@ impl BalloonEpollHandler { } self.queues[queue_index] - .add_used(desc_chain.memory(), desc_chain.head_index(), desc.len()) + .add_used(desc_chain.memory(), desc_chain.head_index(), 0) .map_err(Error::QueueAddUsed)?; used_descs = true; }