<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/fs/super.c, branch v3.4.83</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/fs/super.c?h=v3.4.83</id>
<link rel='self' href='https://git.amat.us/linux/atom/fs/super.c?h=v3.4.83'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2013-08-04T08:25:59Z</updated>
<entry>
<title>livelock avoidance in sget()</title>
<updated>2013-08-04T08:25:59Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2013-07-19T23:13:55Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=257e1c5c8162d71b1006a4d46aaad6d6d7431011'/>
<id>urn:sha1:257e1c5c8162d71b1006a4d46aaad6d6d7431011</id>
<content type='text'>
commit acfec9a5a892f98461f52ed5770de99a3e571ae2 upstream.

Eric Sandeen has found a nasty livelock in sget() - take a mount(2) about
to fail.  The superblock is on -&gt;fs_supers, -&gt;s_umount is held exclusive,
-&gt;s_active is 1.  Along comes two more processes, trying to mount the same
thing; sget() in each is picking that superblock, bumping -&gt;s_count and
trying to grab -&gt;s_umount.  -&gt;s_active is 3 now.  Original mount(2)
finally gets to deactivate_locked_super() on failure; -&gt;s_active is 2,
superblock is still -&gt;fs_supers because shutdown will *not* happen until
-&gt;s_active hits 0.  -&gt;s_umount is dropped and now we have two processes
chasing each other:
s_active = 2, A acquired -&gt;s_umount, B blocked
A sees that the damn thing is stillborn, does deactivate_locked_super()
s_active = 1, A drops -&gt;s_umount, B gets it
A restarts the search and finds the same superblock.  And bumps it -&gt;s_active.
s_active = 2, B holds -&gt;s_umount, A blocked on trying to get it
... and we are in the earlier situation with A and B switched places.

The root cause, of course, is that -&gt;s_active should not grow until we'd
got MS_BORN.  Then failing -&gt;mount() will have deactivate_locked_super()
shut the damn thing down.  Fortunately, it's easy to do - the key point
is that grab_super() is called only for superblocks currently on -&gt;fs_supers,
so it can bump -&gt;s_count and grab -&gt;s_umount first, then check MS_BORN and
bump -&gt;s_active; we must never increment -&gt;s_count for superblocks past
-&gt;kill_sb(), but grab_super() is never called for those.

The bug is pretty old; we would've caught it by now, if not for accidental
exclusion between sget() for block filesystems; the things like cgroup or
e.g. mtd-based filesystems don't have anything of that sort, so they get
bitten.  The right way to deal with that is obviously to fix sget()...

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>Merge tag 'module-for-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux</title>
<updated>2012-03-24T17:24:31Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2012-03-24T17:24:31Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=11bcb32848ddb5ab28f09f142b625e2ba4d55c4c'/>
<id>urn:sha1:11bcb32848ddb5ab28f09f142b625e2ba4d55c4c</id>
<content type='text'>
Pull cleanup of fs/ and lib/ users of module.h from Paul Gortmaker:
 "Fix up files in fs/ and lib/ dirs to only use module.h if they really
  need it.

  These are trivial in scope vs the work done previously.  We now have
  things where any few remaining cleanups can be farmed out to arch or
  subsystem maintainers, and I have done so when possible.  What is
  remaining here represents the bits that don't clearly lie within a
  single arch/subsystem boundary, like the fs dir and the lib dir.

  Some duplicate includes arising from overlapping fixes from
  independent subsystem maintainer submissions are also quashed."

Fix up trivial conflicts due to clashes with other include file cleanups
(including some due to the previous bug.h cleanup pull).

* tag 'module-for-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux:
  lib: reduce the use of module.h wherever possible
  fs: reduce the use of module.h wherever possible
  includecheck: delete any duplicate instances of module.h
</content>
</entry>
<entry>
<title>Merge tag 'stable/for-linus-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/mm</title>
<updated>2012-03-23T02:52:47Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2012-03-23T02:52:47Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=aab008db8063364dc3c8ccf4981c21124866b395'/>
<id>urn:sha1:aab008db8063364dc3c8ccf4981c21124866b395</id>
<content type='text'>
Pull cleancache changes from Konrad Rzeszutek Wilk:
 "This has some patches for the cleancache API that should have been
  submitted a _long_ time ago.  They are basically cleanups:

   - rename of flush to invalidate

   - moving reporting of statistics into debugfs

   - use __read_mostly as necessary.

  Oh, and also the MAINTAINERS file change.  The files (except the
  MAINTAINERS file) have been in #linux-next for months now.  The late
  addition of MAINTAINERS file is a brain-fart on my side - didn't
  realize I needed that just until I was typing this up - and I based
  that patch on v3.3 - so the tree is on top of v3.3."

* tag 'stable/for-linus-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/mm:
  MAINTAINERS: Adding cleancache API to the list.
  mm: cleancache: Use __read_mostly as appropiate.
  mm: cleancache: report statistics via debugfs instead of sysfs.
  mm: zcache/tmem/cleancache: s/flush/invalidate/
  mm: cleancache: s/flush/invalidate/
</content>
</entry>
<entry>
<title>Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security</title>
<updated>2012-03-21T20:25:04Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2012-03-21T20:25:04Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=3556485f1595e3964ba539e39ea682acbb835cee'/>
<id>urn:sha1:3556485f1595e3964ba539e39ea682acbb835cee</id>
<content type='text'>
Pull security subsystem updates for 3.4 from James Morris:
 "The main addition here is the new Yama security module from Kees Cook,
  which was discussed at the Linux Security Summit last year.  Its
  purpose is to collect miscellaneous DAC security enhancements in one
  place.  This also marks a departure in policy for LSM modules, which
  were previously limited to being standalone access control systems.
  Chromium OS is using Yama, and I believe there are plans for Ubuntu,
  at least.

  This patchset also includes maintenance updates for AppArmor, TOMOYO
  and others."

Fix trivial conflict in &lt;net/sock.h&gt; due to the jumo_label-&gt;static_key
rename.

* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: (38 commits)
  AppArmor: Fix location of const qualifier on generated string tables
  TOMOYO: Return error if fails to delete a domain
  AppArmor: add const qualifiers to string arrays
  AppArmor: Add ability to load extended policy
  TOMOYO: Return appropriate value to poll().
  AppArmor: Move path failure information into aa_get_name and rename
  AppArmor: Update dfa matching routines.
  AppArmor: Minor cleanup of d_namespace_path to consolidate error handling
  AppArmor: Retrieve the dentry_path for error reporting when path lookup fails
  AppArmor: Add const qualifiers to generated string tables
  AppArmor: Fix oops in policy unpack auditing
  AppArmor: Fix error returned when a path lookup is disconnected
  KEYS: testing wrong bit for KEY_FLAG_REVOKED
  TOMOYO: Fix mount flags checking order.
  security: fix ima kconfig warning
  AppArmor: Fix the error case for chroot relative path name lookup
  AppArmor: fix mapping of META_READ to audit and quiet flags
  AppArmor: Fix underflow in xindex calculation
  AppArmor: Fix dropping of allowed operations that are force audited
  AppArmor: Add mising end of structure test to caps unpacking
  ...
</content>
</entry>
<entry>
<title>Merge branch 'stable/cleancache.v13' into linux-next</title>
<updated>2012-03-19T16:12:19Z</updated>
<author>
<name>Konrad Rzeszutek Wilk</name>
<email>konrad.wilk@oracle.com</email>
</author>
<published>2012-03-19T16:12:19Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=16c0cfa425b8e1488f7a1873bd112a7a099325f0'/>
<id>urn:sha1:16c0cfa425b8e1488f7a1873bd112a7a099325f0</id>
<content type='text'>
* stable/cleancache.v13:
  mm: cleancache: Use __read_mostly as appropiate.
  mm: cleancache: report statistics via debugfs instead of sysfs.
  mm: zcache/tmem/cleancache: s/flush/invalidate/
  mm: cleancache: s/flush/invalidate/
</content>
</entry>
<entry>
<title>fs: reduce the use of module.h wherever possible</title>
<updated>2012-02-29T00:31:58Z</updated>
<author>
<name>Paul Gortmaker</name>
<email>paul.gortmaker@windriver.com</email>
</author>
<published>2011-11-17T04:57:37Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=630d9c47274aa89bfa77fe6556d7818bdcb12992'/>
<id>urn:sha1:630d9c47274aa89bfa77fe6556d7818bdcb12992</id>
<content type='text'>
For files only using THIS_MODULE and/or EXPORT_SYMBOL, map
them onto including export.h -- or if the file isn't even
using those, then just delete the include.  Fix up any implicit
include dependencies that were being masked by module.h along
the way.

Signed-off-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
</content>
</entry>
<entry>
<title>vfs: Provide function to get superblock and wait for it to thaw</title>
<updated>2012-02-14T01:45:38Z</updated>
<author>
<name>Jan Kara</name>
<email>jack@suse.cz</email>
</author>
<published>2012-02-10T10:03:00Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=6b6dc836a195e077e76977b6c020a73de411b46d'/>
<id>urn:sha1:6b6dc836a195e077e76977b6c020a73de411b46d</id>
<content type='text'>
In quota code we need to find a superblock corresponding to a device and wait
for superblock to be unfrozen. However this waiting has to happen without
s_umount semaphore because that is required for superblock to thaw. So provide
a function in VFS for this to keep dances with s_umount where they belong.

[AV: implementation switched to saner variant]

Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>security: trim security.h</title>
<updated>2012-02-13T23:45:42Z</updated>
<author>
<name>Al Viro</name>
<email>viro@ftp.linux.org.uk</email>
</author>
<published>2012-02-13T03:58:52Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=4040153087478993cbf0809f444400a3c808074c'/>
<id>urn:sha1:4040153087478993cbf0809f444400a3c808074c</id>
<content type='text'>
Trim security.h

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: James Morris &lt;jmorris@namei.org&gt;
</content>
</entry>
<entry>
<title>mm: cleancache: s/flush/invalidate/</title>
<updated>2012-01-23T21:06:24Z</updated>
<author>
<name>Dan Magenheimer</name>
<email>dan.magenheimer@oracle.com</email>
</author>
<published>2011-09-21T15:56:28Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=3167760f83899ccda312b9ad9306ec9e5dda06d4'/>
<id>urn:sha1:3167760f83899ccda312b9ad9306ec9e5dda06d4</id>
<content type='text'>
Per akpm suggestions alter the use of the term flush to be
invalidate. The next patch will do this across all MM.

This change is completely cosmetic.

[v9: akpm@linux-foundation.org: change "flush" to "invalidate", part 3]

Signed-off-by: Dan Magenheimer &lt;dan.magenheimer@oracle.com&gt;
Cc: Kamezawa Hiroyuki &lt;kamezawa.hiroyu@jp.fujitsu.com&gt;
Cc: Jan Beulich &lt;JBeulich@novell.com&gt;
Reviewed-by: Seth Jennings &lt;sjenning@linux.vnet.ibm.com&gt;
Cc: Jeremy Fitzhardinge &lt;jeremy@goop.org&gt;
Cc: Hugh Dickins &lt;hughd@google.com&gt;
Cc: Johannes Weiner &lt;hannes@cmpxchg.org&gt;
Cc: Nitin Gupta &lt;ngupta@vflare.org&gt;
Cc: Matthew Wilcox &lt;matthew@wil.cx&gt;
Cc: Chris Mason &lt;chris.mason@oracle.com&gt;
Cc: Rik Riel &lt;riel@redhat.com&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
[v10: Fixed  fs: move code out of buffer.c conflict change]
Signed-off-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
</content>
</entry>
<entry>
<title>wake up s_wait_unfrozen when -&gt;freeze_fs fails</title>
<updated>2012-01-17T21:38:47Z</updated>
<author>
<name>Kazuya Mio</name>
<email>k-mio@sx.jp.nec.com</email>
</author>
<published>2011-12-01T07:51:07Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=e1616300a20c80396109c1cf013ba9a36055a3da'/>
<id>urn:sha1:e1616300a20c80396109c1cf013ba9a36055a3da</id>
<content type='text'>
dd slept infinitely when fsfeeze failed because of EIO.
To fix this problem, if -&gt;freeze_fs fails, freeze_super() wakes up
the tasks waiting for the filesystem to become unfrozen.

When s_frozen isn't SB_UNFROZEN in __generic_file_aio_write(),
the function sleeps until FITHAW ioctl wakes up s_wait_unfrozen.

However, if -&gt;freeze_fs fails, s_frozen is set to SB_UNFROZEN and then
freeze_super() returns an error number. In this case, FITHAW ioctl returns
EINVAL because s_frozen is already SB_UNFROZEN. There is no way to wake up
s_wait_unfrozen, so __generic_file_aio_write() sleeps infinitely.

Signed-off-by: Kazuya Mio &lt;k-mio@sx.jp.nec.com&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
</feed>
