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-next>] [day] [month] [year] [list]
Message-ID: <CAD-Xujmjai2evYC4a4CdNPtjh_9xhbELcZePtGSS54VPRGpznA@mail.gmail.com>
Date:	Mon, 12 Sep 2011 19:53:03 -0700
From:	Valerie Aurora <val@...consulting.com>
To:	linux-fsdevel@...r.kernel.org, Jan Kara <jack@...e.cz>,
	Dave Chinner <david@...morbit.com>,
	Masayoshi MIZUMA <m.mizuma@...fujitsu.com>,
	Greg Freemyer <greg.freemyer@...il.com>,
	linux-ext4@...r.kernel.org, Eric Sandeen <sandeen@...hat.com>
Subject: [RFC PATCH 0/3] VFS: Fix s_umount thaw/write deadlock

I've been working on some patches to fix the following problem:

File system freeze/thaw require the superblock's s_umount lock.
However, we write to the file system while holding the s_umount lock
in several places (e.g., writeback and quotas).  Any of these can
block on a frozen file system while holding s_umount, preventing any
later thaw from occurring, since thaw requires s_umount.  The solution
is to add a check, vfs_is_frozen(), to all code paths that write while
holding sb->s_umount and return without writing if it is true.

Attached is an audit of each use of ->s_umount and whether it could
result in a deadlock with freeze/thaw.  Some of this has gone into the
code comments.  Patches against some random post 3.0.0 pull to follow.

A patch to xfstests is coming.  Basically, we need to test for mmaped
writes concurrent with file system freeze.  Probably test 068 can be
extended. (If anyone is interested in doing this, it is relatively
simple work.)

Thanks, Jan Kara and Dave Chinner for their kind suggestions for fixes
and review of patches offline.

-VAL

View attachment "audit.txt" of type "text/plain" (5300 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ