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] [day] [month] [year] [list]
Message-ID: <20101028105822.GD2715@dastard>
Date:	Thu, 28 Oct 2010 21:58:22 +1100
From:	Dave Chinner <david@...morbit.com>
To:	Christoph Hellwig <hch@...radead.org>
Cc:	viro@...IV.linux.org.uk, linux-fsdevel@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/4] fs: Lock the inode LRU list separately

On Thu, Oct 28, 2010 at 06:25:21AM -0400, Christoph Hellwig wrote:
> > That doesn't happen because the counter is only modified when
> > the inode is moved on/off the list and there are checks to avoid
> > removing an inode that is not on the list. Also, the inode is not
> > removed from the LRU in dispose_one_inode - it is always done when
> > the inode is marked I_FREEING while the i_lock is held before
> > calling dispose_one_inode().
> > 
> > Basically I wanted to remove the strange "inode is not on the LRU if
> > it is dirty or under writeback" accounting checks and make the
> > accounting symmetric with adding/removing the inodes from the LRU.
> > These are protected by list_empty() checks, so should always end up
> > with the correct accounting.
> > 
> > hence the only special case now is prune_icache() which already
> > holds the inode_lru_lock() so can't call the helper. Besides, we
> > don't need any checks there because we know the inode is on the LRU
> > already....
> 
> Indeed.  What about adding a
> 
> 	BUG_ON(!list_empty(&inode->i_lru));
> 
> to evict to ensure this invariant?

Yup, sounds like a good idea.

Cheers,

Dave.
-- 
Dave Chinner
david@...morbit.com
--
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