Re: [PATCH] VFS: Fix race with new inode creation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Apr 10, 2009 at 9:01 AM, Al Viro <viro@xxxxxxxxxxxxxxxxxx> wrote:
> On Fri, Apr 10, 2009 at 08:31:40AM -0700, Curt Wohlgemuth wrote:
>> This patch fixes a race between a task creating a new inode, and one writing
>> that same new, dirty inode out to disk.
>>
>> We found this using a particular workload (fsstress) along with other
>> ancillary processes running on the same machine.  The symptom is one or more
>> hung unkillable (uniterruptible sleep) tasks that try to operate on this new
>> inode.
>>
>> The original comment block is wrong.  Since the inode gets marked dirty
>> after it's created, but before its I_LOCK bit is cleared, there _can_ be
>> somebody else doing something with this inode -- e.g., a writeback task
>> (in our case, __sync_single_inode()).
>
> Um...  I'd say that the real bug in there is that we shouldn't *get* to
> __sync_single_inode() until I_NEW/I_LOCK are removed.

Well, I thought about that too.  But I haven't seen an issue with this
happening, and
the patch I mailed has the benefit of extreme simplicity.  Plus I
couldn't be sure that
there weren't other spots that assume taking the inode lock meant that
they could
manipulate the i_state field with confidence (though I didn't find any).

Curt
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux