From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
To: Peng Tao <tao.peng@linux.alibaba.com>
Cc: virtio-fs@redhat.com
Subject: Re: [Virtio-fs] [PATCH] virtiofsd: fix lo_do_lookup panic
Date: Thu, 6 Jun 2019 10:54:29 +0100 [thread overview]
Message-ID: <20190606095428.GI2788@work-vm> (raw)
In-Reply-To: <1559805375-44679-1-git-send-email-tao.peng@linux.alibaba.com>
* 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?
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
next prev parent reply other threads:[~2019-06-06 9:54 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 [this message]
2019-06-06 16:52 ` Liu Bo
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=20190606095428.GI2788@work-vm \
--to=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.