[Virtio-fs] [PATCH] virtiofsd: handle NULL dir in lo_do_lookup

Stefan Hajnoczi stefanha at redhat.com
Wed Jul 31 13:01:21 UTC 2019


On Thu, May 23, 2019 at 10:06:34AM +0800, Liu Bo wrote:
> Reported by fstests/generic/467.
> 
> open_by_handle_at() called from fuse inside guest can carry fuse mount
> point to daemon but lo_do_lookup() doesn't know its inode info because
> it's out of fuse's scope, thus lo_inode(req, parent) ends up with
> returning a NULL dir and breaks virtiofsd immediately.
> 
> Note that it'd break applications that uses open_by_handle_at.
> 
> It seems to me that nothing could be done to support open_by_handle_at in
> this case.
> 
> This simply tells fuse a ENOENT error so that open_by_handle_at() in guest
> can get a ESTALE.
> 
> Signed-off-by: Liu Bo <bo.liu at linux.alibaba.com>
> ---
>  contrib/virtiofsd/passthrough_ll.c | 8 ++++++++
>  1 file changed, 8 insertions(+)

Reviewed-by: Stefan Hajnoczi <stefanha at redhat.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/virtio-fs/attachments/20190731/ebf41b30/attachment.sig>


More information about the Virtio-fs mailing list