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

Dr. David Alan Gilbert dgilbert at redhat.com
Wed Jul 31 16:07:48 UTC 2019


* Stefan Hajnoczi (stefanha at redhat.com) wrote:
> 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>


OK, I've finally merged this.
Apologies for the delay; I got hung up on the questions about exportfs
that had been asked at the time and wanted to understand that
we had an answer.

Dave

--
Dr. David Alan Gilbert / dgilbert at redhat.com / Manchester, UK




More information about the Virtio-fs mailing list