lkml.org 
[lkml]   [2021]   [Dec]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v2 62/67] nfs: Convert to new fscache volume/cookie API
Date
David Wysochanski <dwysocha@redhat.com> wrote:

> > (4) fscache_enable/disable_cookie() have been removed.
> >
> > Call fscache_use_cookie() and fscache_unuse_cookie() when a file is
> > opened or closed to prevent a cache file from being culled and to keep
> > resources to hand that are needed to do I/O.
> >
> > Unuse the cookie when a file is opened for writing. This is gated by
> > the NFS_INO_FSCACHE flag on the nfs_inode.
> >
> > A better way might be to invalidate it with FSCACHE_INVAL_DIO_WRITE
> > which will keep it unused until all open files are closed.
> >
>
> It looks like the comment doesn't match what was actually done inside
> nfs_fscache_open_file(). Is the code right and the comment just out of date?

The comment is out of date. NFS_INO_FSCACHE isn't used now.

> I'm getting that kasan UAF firing periodically in this code path, and so it
> looks related to this change,though I don't have great info on it so far and
> it's hard to reproduce.

Can you copy the kasan UAF text into a reply?

David

\
 
 \ /
  Last update: 2021-12-11 14:38    [W:0.246 / U:1.688 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site