[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v4 1/3] virtiofsd: extract lo_do_open() from lo_open()
From: |
Stefan Hajnoczi |
Subject: |
Re: [PATCH v4 1/3] virtiofsd: extract lo_do_open() from lo_open() |
Date: |
Wed, 3 Feb 2021 16:57:42 +0000 |
On Wed, Feb 03, 2021 at 02:47:30PM +0000, Dr. David Alan Gilbert wrote:
> * Greg Kurz (groug@kaod.org) wrote:
> > On Wed, 3 Feb 2021 11:37:17 +0000
> > Stefan Hajnoczi <stefanha@redhat.com> wrote:
> >
> > > Both lo_open() and lo_create() have similar code to open a file. Extract
> > > a common lo_do_open() function from lo_open() that will be used by
> > > lo_create() in a later commit.
> > >
> > > Since lo_do_open() does not otherwise need fuse_req_t req, convert
> > > lo_add_fd_mapping() to use struct lo_data *lo instead.
> > >
> > > Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
> > > ---
> >
> > With the s/ENOMEM/-ENOMEM/ change in lo_do_open() suggested by patchew,
>
> Isn't it actually the return -errno that's different from the original?
Yes. It should be return errno since lo_open() expected err = 0
(success) or a positive errno.
Will fix.
Stefan
signature.asc
Description: PGP signature
[PATCH v4 2/3] virtiofsd: optionally return inode pointer from lo_do_lookup(), Stefan Hajnoczi, 2021/02/03
[PATCH v4 3/3] virtiofsd: prevent opening of special files (CVE-2020-35517), Stefan Hajnoczi, 2021/02/03