Re: do_remount_sb(RDONLY) race? (was: XFS oops under 2.6.23.9)

From: Christoph Hellwig
Date: Wed Jan 23 2008 - 07:55:23 EST


On Wed, Jan 23, 2008 at 04:34:12PM +1100, David Chinner wrote:
> I've had suspicions of a race in the remount-ro code in
> do_remount_sb() w.r.t to the fs_may_remount_ro() check. That is, we
> do an unlocked check to see if we can remount readonly and then fail
> to check again once we've locked the superblock out and start the
> remount.

This code is inherently racy, and will be replaced with a proper
per-vfsmount writer count in 2.6.25 as part of the per-mount r/o patches.

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