[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAJfpegtqGDt4fnDsLtLEhg3ysw5TtfPamJ18TGSpSJve94KNzQ@mail.gmail.com>
Date: Wed, 1 Feb 2023 16:54:21 +0100
From: Miklos Szeredi <miklos@...redi.hu>
To: Jiachen Zhang <zhangjiachen.jaycee@...edance.com>
Cc: linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] fuse: initialize attr_version of new fuse inodes by fc->attr_version
On Thu, 17 Nov 2022 at 09:52, Jiachen Zhang
<zhangjiachen.jaycee@...edance.com> wrote:
>
> On Fri, Nov 11, 2022 at 5:37 PM Jiachen Zhang
> <zhangjiachen.jaycee@...edance.com> wrote:
> >
> > The FUSE_READDIRPLUS request reply handler fuse_direntplus_link() might
> > call fuse_iget() to initialize a new fuse_inode and change its attributes.
> > But as the new fi->attr_version is always initialized with 0, even if the
> > attr_version of the FUSE_READDIRPLUS request has become staled, staled attr
> > may still be set to the new fuse_inode. This may cause file size
> > inconsistency even when a filesystem backend is mounted with a single FUSE
> > mountpoint.
> >
> > This commit fixes the issue by initializing new fuse_inode attr_versions by
> > the global fc->attr_version. This may introduce more FUSE_GETATTR but can
> > avoid weird attributes rollback being seen by users.
> >
> > Fixes: 19332138887c ("fuse: initialize attr_version of new fuse inodes by fc->attr_version")
>
> Ping..., and the Fixes tag should be:
>
> Fixes: fbee36b92abc ("fuse: fix uninitialized field in fuse_inode")
Do you have a reproducer?
Thanks,
Miklos
Powered by blists - more mailing lists