All of lore.kernel.org
 help / color / mirror / Atom feed
From: Liu Bo <bo.liu@linux.alibaba.com>
To: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
Cc: virtio-fs@redhat.com, Peng Tao <tao.peng@linux.alibaba.com>
Subject: Re: [Virtio-fs] [PATCH] virtiofsd: fix lo_do_lookup panic
Date: Thu, 6 Jun 2019 09:52:11 -0700	[thread overview]
Message-ID: <20190606165210.is2qp5gu6ghvzroe@US-160370MP2.local> (raw)
In-Reply-To: <20190606095428.GI2788@work-vm>

On Thu, Jun 06, 2019 at 10:54:29AM +0100, Dr. David Alan Gilbert wrote:
> * Peng Tao (tao.peng@linux.alibaba.com) wrote:
> > It needs to check for invalid parent dir.
> > 
> > Signed-off-by: Peng Tao <tao.peng@linux.alibaba.com>
> 
> This is the same as Liu Bo's patch from 23rd May; but there
> was some discussion about what to do about open_by_handle_at.
> Did we ever get an answer to that?

No answer yet, here we haven't got a usecase which is uing exportfs.

The discussion was related but not rejecting the patch, it's about
whether we should disable exportfs if we cannot support it well.

Peng's patch returns EBADF while mine was returning ENOENT, I'm OK
with either errno, up to you :-)

thanks,
-liubo
> 
> Dave
> 
> > ---
> >  contrib/virtiofsd/passthrough_ll.c | 3 +++
> >  1 file changed, 3 insertions(+)
> > 
> > diff --git a/contrib/virtiofsd/passthrough_ll.c b/contrib/virtiofsd/passthrough_ll.c
> > index 8a3adc9..f544387 100644
> > --- a/contrib/virtiofsd/passthrough_ll.c
> > +++ b/contrib/virtiofsd/passthrough_ll.c
> > @@ -640,6 +640,9 @@ static int lo_do_lookup(fuse_req_t req, fuse_ino_t parent, const char *name,
> >  	struct lo_data *lo = lo_data(req);
> >  	struct lo_inode *inode, *dir = lo_inode(req, parent);
> >  
> > +	if (dir == NULL)
> > +		return EBADF;
> > +
> >  	memset(e, 0, sizeof(*e));
> >  	e->attr_timeout = lo->timeout;
> >  	e->entry_timeout = lo->timeout;
> > -- 
> > 1.8.3.1
> > 
> --
> Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK


      reply	other threads:[~2019-06-06 16:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-06  7:16 [Virtio-fs] [PATCH] virtiofsd: fix lo_do_lookup panic Peng Tao
2019-06-06  9:54 ` Dr. David Alan Gilbert
2019-06-06 16:52   ` Liu Bo [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190606165210.is2qp5gu6ghvzroe@US-160370MP2.local \
    --to=bo.liu@linux.alibaba.com \
    --cc=dgilbert@redhat.com \
    --cc=tao.peng@linux.alibaba.com \
    --cc=virtio-fs@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.