|
exports.insert((self.cfg.export_fsid, handle), fd); |
I just noticed that the VIRTIO_IOC_EXPORT_FD_REQ handler always writes new FDs to the export table without checking whether an entry already existed. So the previous entry is dropped there and replaced with a new one if the same handle is exported twice. This is probably fine?? but it probably would be better to reuse the fd?
libkrun/src/devices/src/virtio/fs/linux/passthrough.rs
Line 2225 in 44312fd
I just noticed that the
VIRTIO_IOC_EXPORT_FD_REQhandler always writes new FDs to the export table without checking whether an entry already existed. So the previous entry is dropped there and replaced with a new one if the same handle is exported twice. This is probably fine?? but it probably would be better to reuse the fd?