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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100119184631.GA11408@infradead.org>
Date:	Tue, 19 Jan 2010 13:46:31 -0500
From:	Christoph Hellwig <hch@...radead.org>
To:	Peter Zijlstra <peterz@...radead.org>
Cc:	Dave Chinner <david@...morbit.com>, linux-kernel@...r.kernel.org,
	mingo@...hat.com, Christoph Hellwig <hch@...radead.org>,
	Nick Piggin <nickpiggin@...oo.com.au>,
	linux-fsdevel@...r.kernel.org, viro@...iv.linux.org.uk,
	swhiteho@...hat.com
Subject: Re: lockdep: inconsistent {RECLAIM_FS-ON-W} -> {IN-RECLAIM_FS-R}
	usage.

On Fri, Jan 15, 2010 at 01:53:15PM +0100, Peter Zijlstra wrote:
> Well, I don't know enough about xfs (of filesystems in generic) to say
> that with any certainty, but I can imagine inode writeback from the sync
> that goes with umount to cause issues.
> 
> If this inode reclaim is past all that and the filesystem is basically
> RO, then I don't think so and this could be considered a false positive,
> in which case we need an annotation for this.

The issue is a bit more complicated.  In the unmount case
invalidate_inodes() is indeed called after the filesystem is effectively
read-only for user origination operations.  But there's a miriad of
other invalidate_inodes() calls:

 - fs/block_dev.c:__invalidate_device()

	This gets called from block device codes for various kinds of
	invalidations.  Doesn't make any sense at all to me, but hey..

 - fs/ext2/super.c:ext2_remount()

	Appears like it's used to check for activate inodes during
	remount.  Very fishy usage, and could just be replaced with
	a list walk without any I/O

 - fs/gfs2/glock.c:gfs2_gl_hash_clear()

	No idea.

 - fs/gfs2/ops_fstype.c:fill_super()

	Tries to kill all inodes in the fill_super error path, looks
	very fishy.

 - fs/ntfs/super.c:ntfs_fill_super()

	Failure case of fill_super again, does not look very useful.A

 - fs/smbfs/inode.c:smb_invalidate_inodes()

	Used when a connection goes bad.

In short we can't generally rely on this only happening on a dead fs.


But in the end we abuse iprune_sem to work around a ref counting
problem.  As long as we keep a reference to the superblock for each
inode on the dispose list the superblock can't go away and there's
no need for the lock at all.
--
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