[Virtio-fs] [virtiofsd] Issue opened: Wrongly implemented InodeData refcounting can increase refcount from 0 to 1

virtiofs-bot at sinrega.org virtiofs-bot at sinrega.org
Sat Jan 29 11:41:54 UTC 2022


The code at https://gitlab.com/virtio-fs/virtiofsd/-/blob/50ffd53962ffe10bc18760d91f21eae79bb7f42c/src/passthrough/mod.rs#L775 can increase the refcount from 0 to 1.
In this case, the consequence is that in `self.do_lookup()` we return an InodeData that is no longer in the `self.inodes` map. It probably doesn't violate any invariant we have, and hence it probably doesn't lead to a panic or the like. But it's nevertheless a behavior that's unexpected (and probably unintended by the programmer of that line).
---
https://gitlab.com/virtio-fs/virtiofsd/-/issues/25




More information about the Virtio-fs mailing list