[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110727011554.GN22133@ZenIV.linux.org.uk>
Date: Wed, 27 Jul 2011 02:15:54 +0100
From: Al Viro <viro@...IV.linux.org.uk>
To: Theodore Ts'o <tytso@....edu>
Cc: Ext4 Developers List <linux-ext4@...r.kernel.org>
Subject: Re: [PATCH] ext4: fix races in ext4_sync_parent()
On Tue, Jul 26, 2011 at 09:13:12PM -0400, Theodore Ts'o wrote:
> + inode = igrab(inode);
> + while (ext4_test_inode_state(inode, EXT4_STATE_NEWENTRY)) {
> ext4_clear_inode_state(inode, EXT4_STATE_NEWENTRY);
> - dentry = list_entry(inode->i_dentry.next,
> - struct dentry, d_alias);
> - if (!dentry || !dentry->d_parent || !dentry->d_parent->d_inode)
> + dentry = list_first_entry(&inode->i_dentry,
> + struct dentry, d_alias);
... and what if you don't have a dentry for that inode anymore?
> + next = igrab(dentry->d_parent->d_inode);
what protects you against rename() (OK, d_mode()) here?
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists