<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/fs/notify, branch v2.6.35.9</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/fs/notify?h=v2.6.35.9</id>
<link rel='self' href='https://git.amat.us/linux/atom/fs/notify?h=v2.6.35.9'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2010-09-27T00:18:31Z</updated>
<entry>
<title>inotify: send IN_UNMOUNT events</title>
<updated>2010-09-27T00:18:31Z</updated>
<author>
<name>Eric Paris</name>
<email>eparis@redhat.com</email>
</author>
<published>2010-07-28T14:18:37Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f4254199838237a0b7df93474cf6b4f46c0b0a4a'/>
<id>urn:sha1:f4254199838237a0b7df93474cf6b4f46c0b0a4a</id>
<content type='text'>
commit 611da04f7a31b2208e838be55a42c7a1310ae321 upstream.

Since the .31 or so notify rewrite inotify has not sent events about
inodes which are unmounted.  This patch restores those events.

Signed-off-by: Eric Paris &lt;eparis@redhat.com&gt;
Cc: Ben Hutchings &lt;ben@decadent.org.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>Saner locking around deactivate_super()</title>
<updated>2010-05-21T22:31:14Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2010-03-22T19:22:31Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=1712ac8fda7d8bc4dc921f5777b7423aacad7263'/>
<id>urn:sha1:1712ac8fda7d8bc4dc921f5777b7423aacad7263</id>
<content type='text'>
Make sure that s_umount is acquired *before* we drop the final
active reference; we still have the fast path (atomic_dec_unless)
and we have gotten rid of the window between the moment when
s_active hits zero and s_umount is acquired.  Which simplifies
the living hell out of grab_super() and inotify pin_to_kill()
stuff.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>get rid of S_BIAS</title>
<updated>2010-05-21T22:31:14Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2010-03-22T12:53:19Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b20bd1a5e78af267dc4b6e1ffed48d5d776302c5'/>
<id>urn:sha1:b20bd1a5e78af267dc4b6e1ffed48d5d776302c5</id>
<content type='text'>
use atomic_inc_not_zero(&amp;sb-&gt;s_active) instead of playing games with
checking -&gt;s_count &gt; S_BIAS

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>Merge branch 'for-linus' of git://git.infradead.org/users/eparis/notify</title>
<updated>2010-05-14T18:49:42Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2010-05-14T18:49:42Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=4fc4c3ce0dc1096cbd0daa3fe8f6905cbec2b87e'/>
<id>urn:sha1:4fc4c3ce0dc1096cbd0daa3fe8f6905cbec2b87e</id>
<content type='text'>
* 'for-linus' of git://git.infradead.org/users/eparis/notify:
  inotify: don't leak user struct on inotify release
  inotify: race use after free/double free in inotify inode marks
  inotify: clean up the inotify_add_watch out path
  Inotify: undefined reference to `anon_inode_getfd'

Manual merge to remove duplicate "select ANON_INODES" from Kconfig file
</content>
</entry>
<entry>
<title>inotify: don't leak user struct on inotify release</title>
<updated>2010-05-14T15:53:36Z</updated>
<author>
<name>Pavel Emelyanov</name>
<email>xemul@openvz.org</email>
</author>
<published>2010-05-12T22:34:07Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b3b38d842fa367d862b83e7670af4e0fd6a80fc0'/>
<id>urn:sha1:b3b38d842fa367d862b83e7670af4e0fd6a80fc0</id>
<content type='text'>
inotify_new_group() receives a get_uid-ed user_struct and saves the
reference on group-&gt;inotify_data.user.  The problem is that free_uid() is
never called on it.

Issue seem to be introduced by 63c882a0 (inotify: reimplement inotify
using fsnotify) after 2.6.30.

Signed-off-by: Pavel Emelyanov &lt;xemul@openvz.org&gt;
Eric Paris &lt;eparis@parisplace.org&gt;
Cc: &lt;stable@kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Eric Paris &lt;eparis@redhat.com&gt;
</content>
</entry>
<entry>
<title>inotify: race use after free/double free in inotify inode marks</title>
<updated>2010-05-14T15:52:57Z</updated>
<author>
<name>Eric Paris</name>
<email>eparis@redhat.com</email>
</author>
<published>2010-05-11T21:17:40Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=e08733446e72b983fed850fc5d8bd21b386feb29'/>
<id>urn:sha1:e08733446e72b983fed850fc5d8bd21b386feb29</id>
<content type='text'>
There is a race in the inotify add/rm watch code.  A task can find and
remove a mark which doesn't have all of it's references.  This can
result in a use after free/double free situation.

Task A					Task B
------------				-----------
inotify_new_watch()
 allocate a mark (refcnt == 1)
 add it to the idr
					inotify_rm_watch()
					 inotify_remove_from_idr()
					  fsnotify_put_mark()
					      refcnt hits 0, free
 take reference because we are on idr
 [at this point it is a use after free]
 [time goes on]
 refcnt may hit 0 again, double free

The fix is to take the reference BEFORE the object can be found in the
idr.

Signed-off-by: Eric Paris &lt;eparis@redhat.com&gt;
Cc: &lt;stable@kernel.org&gt;
</content>
</entry>
<entry>
<title>inotify: clean up the inotify_add_watch out path</title>
<updated>2010-05-14T15:51:07Z</updated>
<author>
<name>Eric Paris</name>
<email>eparis@redhat.com</email>
</author>
<published>2010-05-11T21:16:23Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=3dbc6fb6a3c8a7dc164ae330ab024a3fe65ae53e'/>
<id>urn:sha1:3dbc6fb6a3c8a7dc164ae330ab024a3fe65ae53e</id>
<content type='text'>
inotify_add_watch explictly frees the unused inode mark, but it can just
use the generic code.  Just do that.

Signed-off-by: Eric Paris &lt;eparis@redhat.com&gt;
</content>
</entry>
<entry>
<title>Inotify: undefined reference to `anon_inode_getfd'</title>
<updated>2010-05-12T15:03:40Z</updated>
<author>
<name>Russell King</name>
<email>rmk@arm.linux.org.uk</email>
</author>
<published>2010-04-18T20:25:11Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=e7b702b1a8f2a6961367da903217e669be0f099f'/>
<id>urn:sha1:e7b702b1a8f2a6961367da903217e669be0f099f</id>
<content type='text'>
Fix:

fs/built-in.o: In function `sys_inotify_init1':
summary.c:(.text+0x347a4): undefined reference to `anon_inode_getfd'

found by kautobuild with arms bcmring_defconfig, which ends up with
INOTIFY_USER enabled (through the 'default y') but leaves ANON_INODES
unset.  However, inotify_user.c uses anon_inode_getfd().

Signed-off-by: Russell King &lt;rmk+kernel@arm.linux.org.uk&gt;
Signed-off-by: Eric Paris &lt;eparis@redhat.com&gt;
</content>
</entry>
<entry>
<title>Inotify: Fix build failure in inotify user support</title>
<updated>2010-04-30T17:14:56Z</updated>
<author>
<name>Ralf Baechle</name>
<email>ralf@linux-mips.org</email>
</author>
<published>2010-03-08T19:51:03Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=12b1b321689cf92236fb216472744e39419fab30'/>
<id>urn:sha1:12b1b321689cf92236fb216472744e39419fab30</id>
<content type='text'>
CONFIG_INOTIFY_USER defined but CONFIG_ANON_INODES undefined will result
in the following build failure:

    LD      vmlinux
  fs/built-in.o: In function 'sys_inotify_init1':
  (.text.sys_inotify_init1+0x22c): undefined reference to 'anon_inode_getfd'
  fs/built-in.o: In function `sys_inotify_init1':
  (.text.sys_inotify_init1+0x22c): relocation truncated to fit: R_MIPS_26 against 'anon_inode_getfd'
  make[2]: *** [vmlinux] Error 1
  make[1]: *** [sub-make] Error 2
  make: *** [all] Error 2

Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
Cc: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h</title>
<updated>2010-03-30T13:02:32Z</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2010-03-24T08:04:11Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=5a0e3ad6af8660be21ca98a971cd00f331318c05'/>
<id>urn:sha1:5a0e3ad6af8660be21ca98a971cd00f331318c05</id>
<content type='text'>
percpu.h is included by sched.h and module.h and thus ends up being
included when building most .c files.  percpu.h includes slab.h which
in turn includes gfp.h making everything defined by the two files
universally available and complicating inclusion dependencies.

percpu.h -&gt; slab.h dependency is about to be removed.  Prepare for
this change by updating users of gfp and slab facilities include those
headers directly instead of assuming availability.  As this conversion
needs to touch large number of source files, the following script is
used as the basis of conversion.

  http://userweb.kernel.org/~tj/misc/slabh-sweep.py

The script does the followings.

* Scan files for gfp and slab usages and update includes such that
  only the necessary includes are there.  ie. if only gfp is used,
  gfp.h, if slab is used, slab.h.

* When the script inserts a new include, it looks at the include
  blocks and try to put the new include such that its order conforms
  to its surrounding.  It's put in the include block which contains
  core kernel includes, in the same order that the rest are ordered -
  alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
  doesn't seem to be any matching order.

* If the script can't find a place to put a new include (mostly
  because the file doesn't have fitting include block), it prints out
  an error message indicating which .h file needs to be added to the
  file.

The conversion was done in the following steps.

1. The initial automatic conversion of all .c files updated slightly
   over 4000 files, deleting around 700 includes and adding ~480 gfp.h
   and ~3000 slab.h inclusions.  The script emitted errors for ~400
   files.

2. Each error was manually checked.  Some didn't need the inclusion,
   some needed manual addition while adding it to implementation .h or
   embedding .c file was more appropriate for others.  This step added
   inclusions to around 150 files.

3. The script was run again and the output was compared to the edits
   from #2 to make sure no file was left behind.

4. Several build tests were done and a couple of problems were fixed.
   e.g. lib/decompress_*.c used malloc/free() wrappers around slab
   APIs requiring slab.h to be added manually.

5. The script was run on all .h files but without automatically
   editing them as sprinkling gfp.h and slab.h inclusions around .h
   files could easily lead to inclusion dependency hell.  Most gfp.h
   inclusion directives were ignored as stuff from gfp.h was usually
   wildly available and often used in preprocessor macros.  Each
   slab.h inclusion directive was examined and added manually as
   necessary.

6. percpu.h was updated not to include slab.h.

7. Build test were done on the following configurations and failures
   were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
   distributed build env didn't work with gcov compiles) and a few
   more options had to be turned off depending on archs to make things
   build (like ipr on powerpc/64 which failed due to missing writeq).

   * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
   * powerpc and powerpc64 SMP allmodconfig
   * sparc and sparc64 SMP allmodconfig
   * ia64 SMP allmodconfig
   * s390 SMP allmodconfig
   * alpha SMP allmodconfig
   * um on x86_64 SMP allmodconfig

8. percpu.h modifications were reverted so that it could be applied as
   a separate patch and serve as bisection point.

Given the fact that I had only a couple of failures from tests on step
6, I'm fairly confident about the coverage of this conversion patch.
If there is a breakage, it's likely to be something in one of the arch
headers which should be easily discoverable easily on most builds of
the specific arch.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Guess-its-ok-by: Christoph Lameter &lt;cl@linux-foundation.org&gt;
Cc: Ingo Molnar &lt;mingo@redhat.com&gt;
Cc: Lee Schermerhorn &lt;Lee.Schermerhorn@hp.com&gt;
</content>
</entry>
</feed>
