[Virtio-fs] [virtiofsd-rs] Issue closed: Buggy DescriptorChainConsummer::split_at()?

virtiofs-bot at sinrega.org virtiofs-bot at sinrega.org
Tue Nov 30 09:04:40 UTC 2021


While working on moving the code to mm-virtio, I realize this part looks wrong:

https://gitlab.com/virtio-fs/virtiofsd-rs/-/blob/main/src/descriptor_utils.rs#L158

```rust
                self.buffers
                    .push_back(front.offset(rem).map_err(Error::VolatileMemoryError)?);
                other.push_front(front.offset(rem).map_err(Error::VolatileMemoryError)?);
```

The "other" end correctly receives the end of the buffer (at offset rem). But self should be truncated instead.
---
https://gitlab.com/virtio-fs/virtiofsd-rs/-/issues/6




More information about the Virtio-fs mailing list