lkml.org 
[lkml]   [2016]   [Sep]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: Race condition between iget_locked() and evict_inodes()
Date
Hi Al,

> On 29 Sep 2016, at 13:17, Al Viro <viro@ZenIV.linux.org.uk> wrote:
>
> On Thu, Sep 29, 2016 at 11:53:21AM +0000, Anton Altaparmakov wrote:
>> Thus if the events happen in this order:
>>
>> evict_inodes() iget_locked() in find_inode_fast()
>
> ... you are buggered, because somebody is trying to grab a reference
> to inode on a filesystem that is being shut down. Look at evict_inode()
> caller...

But what if that somebody is simply the file system being shutdown trying to flush some dirty metadata to disk which is stored in a file and thus accessed via an inode and thus iget on the inode is needed? Surely that is allowed even during shutdown. Once the write is complete iput() is called which then immediately evicts the inode as MS_ACTIVE is clear...

Best regards,

Anton
--
Anton Altaparmakov <anton at tuxera.com> (replace at with @)
Lead in File System Development, Tuxera Inc., http://www.tuxera.com/
Linux NTFS maintainer

\
 
 \ /
  Last update: 2016-09-29 14:57    [W:0.053 / U:0.836 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site