lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 30 Nov 2007 09:07:06 +1100
From:	Neil Brown <neilb@...e.de>
To:	David Chinner <dgc@....com>
Cc:	lkml <linux-kernel@...r.kernel.org>,
	linux-fsdevel <linux-fsdevel@...r.kernel.org>
Subject: Re: Race between generic_forget_inode() and sync_sb_inodes()?


Hi David,

On Friday November 30, dgc@....com wrote:
> 
> 
> I came across this because I've been making changes to XFS to avoid the
> inode hash, and I've found that I need to remove the inode from the
> dirty list when setting I_WILL_FREE to avoid this race. I can't see
> how this race is avoided when inodes are hashed, so I'm wondering
> if we've just been lucky or there's something that I'm missing that
> means the above does not occur.

Looking at inode.c in 2.6.23-mm1, in generic_forget_inode, I see code:

	if (!hlist_unhashed(&inode->i_hash)) {
		if (!(inode->i_state & (I_DIRTY|I_SYNC)))
			list_move(&inode->i_list, &inode_unused);

so it looks to me like:
   If the inode is hashed and dirty, then move it (off the s_dirty
   list) to inode_unused.

So it seems to me that generic_forget_inode also finds it needs to
remove the inode from the dirty list when setting I_WILL_FREE.

Maybe we are looking at different kernel versions?  Maybe I
misunderstood your problem?

NeilBrown
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ