<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/fs/notify/mark.c, branch v3.10</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>fsnotify: change locking order</title>
<updated>2012-12-11T18:44:36+00:00</updated>
<author>
<name>Lino Sanfilippo</name>
<email>LinoSanfilippo@gmx.de</email>
</author>
<published>2011-08-11T23:13:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=6960b0d909cde5bdff49e4e5c1250edd10be7ebd'/>
<id>6960b0d909cde5bdff49e4e5c1250edd10be7ebd</id>
<content type='text'>
On Mon, Aug 01, 2011 at 04:38:22PM -0400, Eric Paris wrote:
&gt;
&gt; I finally built and tested a v3.0 kernel with these patches (I know I'm
&gt; SOOOOOO far behind).  Not what I hoped for:
&gt;
&gt; &gt; [  150.937798] VFS: Busy inodes after unmount of tmpfs. Self-destruct in 5 seconds.  Have a nice day...
&gt; &gt; [  150.945290] BUG: unable to handle kernel NULL pointer dereference at 0000000000000070
&gt; &gt; [  150.946012] IP: [&lt;ffffffff810ffd58&gt;] shmem_free_inode+0x18/0x50
&gt; &gt; [  150.946012] PGD 2bf9e067 PUD 2bf9f067 PMD 0
&gt; &gt; [  150.946012] Oops: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC
&gt; &gt; [  150.946012] CPU 0
&gt; &gt; [  150.946012] Modules linked in: nfs lockd fscache auth_rpcgss nfs_acl sunrpc ip6t_REJECT nf_conntrack_ipv6 nf_defrag_ipv6 ip6table_filter ip6_tables ext4 jbd2 crc16 joydev ata_piix i2c_piix4 pcspkr uinput ipv6 autofs4 usbhid [last unloaded: scsi_wait_scan]
&gt; &gt; [  150.946012]
&gt; &gt; [  150.946012] Pid: 2764, comm: syscall_thrash Not tainted 3.0.0+ #1 Red Hat KVM
&gt; &gt; [  150.946012] RIP: 0010:[&lt;ffffffff810ffd58&gt;]  [&lt;ffffffff810ffd58&gt;] shmem_free_inode+0x18/0x50
&gt; &gt; [  150.946012] RSP: 0018:ffff88002c2e5df8  EFLAGS: 00010282
&gt; &gt; [  150.946012] RAX: 000000004e370d9f RBX: 0000000000000000 RCX: ffff88003a029438
&gt; &gt; [  150.946012] RDX: 0000000033630a5f RSI: 0000000000000000 RDI: ffff88003491c240
&gt; &gt; [  150.946012] RBP: ffff88002c2e5e08 R08: 0000000000000000 R09: 0000000000000000
&gt; &gt; [  150.946012] R10: 0000000000000000 R11: 0000000000000000 R12: ffff88003a029428
&gt; &gt; [  150.946012] R13: ffff88003a029428 R14: ffff88003a029428 R15: ffff88003499a610
&gt; &gt; [  150.946012] FS:  00007f5a05420700(0000) GS:ffff88003f600000(0000) knlGS:0000000000000000
&gt; &gt; [  150.946012] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
&gt; &gt; [  150.946012] CR2: 0000000000000070 CR3: 000000002a662000 CR4: 00000000000006f0
&gt; &gt; [  150.946012] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
&gt; &gt; [  150.946012] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
&gt; &gt; [  150.946012] Process syscall_thrash (pid: 2764, threadinfo ffff88002c2e4000, task ffff88002bfbc760)
&gt; &gt; [  150.946012] Stack:
&gt; &gt; [  150.946012]  ffff88003a029438 ffff88003a029428 ffff88002c2e5e38 ffffffff81102f76
&gt; &gt; [  150.946012]  ffff88003a029438 ffff88003a029598 ffffffff8160f9c0 ffff88002c221250
&gt; &gt; [  150.946012]  ffff88002c2e5e68 ffffffff8115e9be ffff88002c2e5e68 ffff88003a029438
&gt; &gt; [  150.946012] Call Trace:
&gt; &gt; [  150.946012]  [&lt;ffffffff81102f76&gt;] shmem_evict_inode+0x76/0x130
&gt; &gt; [  150.946012]  [&lt;ffffffff8115e9be&gt;] evict+0x7e/0x170
&gt; &gt; [  150.946012]  [&lt;ffffffff8115ee40&gt;] iput_final+0xd0/0x190
&gt; &gt; [  150.946012]  [&lt;ffffffff8115ef33&gt;] iput+0x33/0x40
&gt; &gt; [  150.946012]  [&lt;ffffffff81180205&gt;] fsnotify_destroy_mark_locked+0x145/0x160
&gt; &gt; [  150.946012]  [&lt;ffffffff81180316&gt;] fsnotify_destroy_mark+0x36/0x50
&gt; &gt; [  150.946012]  [&lt;ffffffff81181937&gt;] sys_inotify_rm_watch+0x77/0xd0
&gt; &gt; [  150.946012]  [&lt;ffffffff815aca52&gt;] system_call_fastpath+0x16/0x1b
&gt; &gt; [  150.946012] Code: 67 4a 00 b8 e4 ff ff ff eb aa 66 0f 1f 84 00 00 00 00 00 55 48 89 e5 48 83 ec 10 48 89 1c 24 4c 89 64 24 08 48 8b 9f 40 05 00 00
&gt; &gt; [  150.946012]  83 7b 70 00 74 1c 4c 8d a3 80 00 00 00 4c 89 e7 e8 d2 5d 4a
&gt; &gt; [  150.946012] RIP  [&lt;ffffffff810ffd58&gt;] shmem_free_inode+0x18/0x50
&gt; &gt; [  150.946012]  RSP &lt;ffff88002c2e5df8&gt;
&gt; &gt; [  150.946012] CR2: 0000000000000070
&gt;
&gt; Looks at aweful lot like the problem from:
&gt; http://www.spinics.net/lists/linux-fsdevel/msg46101.html
&gt;

I tried to reproduce this bug with your test program, but without success.
However, if I understand correctly, this occurs since we dont hold any locks when
we call iput() in mark_destroy(), right?
With the patches you tested, iput() is also not called within any lock, since the
groups mark_mutex is released temporarily before iput() is called.  This is, since
the original codes behaviour is similar.
However since we now have a mutex as the biggest lock, we can do what you
suggested (http://www.spinics.net/lists/linux-fsdevel/msg46107.html) and
call iput() with the mutex held to avoid the race.
The patch below implements this. It uses nested locking to avoid deadlock in case
we do the final iput() on an inode which still holds marks and thus would take
the mutex again when calling fsnotify_inode_delete() in destroy_inode().

Signed-off-by: Lino Sanfilippo &lt;LinoSanfilippo@gmx.de&gt;
Signed-off-by: Eric Paris &lt;eparis@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
On Mon, Aug 01, 2011 at 04:38:22PM -0400, Eric Paris wrote:
&gt;
&gt; I finally built and tested a v3.0 kernel with these patches (I know I'm
&gt; SOOOOOO far behind).  Not what I hoped for:
&gt;
&gt; &gt; [  150.937798] VFS: Busy inodes after unmount of tmpfs. Self-destruct in 5 seconds.  Have a nice day...
&gt; &gt; [  150.945290] BUG: unable to handle kernel NULL pointer dereference at 0000000000000070
&gt; &gt; [  150.946012] IP: [&lt;ffffffff810ffd58&gt;] shmem_free_inode+0x18/0x50
&gt; &gt; [  150.946012] PGD 2bf9e067 PUD 2bf9f067 PMD 0
&gt; &gt; [  150.946012] Oops: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC
&gt; &gt; [  150.946012] CPU 0
&gt; &gt; [  150.946012] Modules linked in: nfs lockd fscache auth_rpcgss nfs_acl sunrpc ip6t_REJECT nf_conntrack_ipv6 nf_defrag_ipv6 ip6table_filter ip6_tables ext4 jbd2 crc16 joydev ata_piix i2c_piix4 pcspkr uinput ipv6 autofs4 usbhid [last unloaded: scsi_wait_scan]
&gt; &gt; [  150.946012]
&gt; &gt; [  150.946012] Pid: 2764, comm: syscall_thrash Not tainted 3.0.0+ #1 Red Hat KVM
&gt; &gt; [  150.946012] RIP: 0010:[&lt;ffffffff810ffd58&gt;]  [&lt;ffffffff810ffd58&gt;] shmem_free_inode+0x18/0x50
&gt; &gt; [  150.946012] RSP: 0018:ffff88002c2e5df8  EFLAGS: 00010282
&gt; &gt; [  150.946012] RAX: 000000004e370d9f RBX: 0000000000000000 RCX: ffff88003a029438
&gt; &gt; [  150.946012] RDX: 0000000033630a5f RSI: 0000000000000000 RDI: ffff88003491c240
&gt; &gt; [  150.946012] RBP: ffff88002c2e5e08 R08: 0000000000000000 R09: 0000000000000000
&gt; &gt; [  150.946012] R10: 0000000000000000 R11: 0000000000000000 R12: ffff88003a029428
&gt; &gt; [  150.946012] R13: ffff88003a029428 R14: ffff88003a029428 R15: ffff88003499a610
&gt; &gt; [  150.946012] FS:  00007f5a05420700(0000) GS:ffff88003f600000(0000) knlGS:0000000000000000
&gt; &gt; [  150.946012] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
&gt; &gt; [  150.946012] CR2: 0000000000000070 CR3: 000000002a662000 CR4: 00000000000006f0
&gt; &gt; [  150.946012] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
&gt; &gt; [  150.946012] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
&gt; &gt; [  150.946012] Process syscall_thrash (pid: 2764, threadinfo ffff88002c2e4000, task ffff88002bfbc760)
&gt; &gt; [  150.946012] Stack:
&gt; &gt; [  150.946012]  ffff88003a029438 ffff88003a029428 ffff88002c2e5e38 ffffffff81102f76
&gt; &gt; [  150.946012]  ffff88003a029438 ffff88003a029598 ffffffff8160f9c0 ffff88002c221250
&gt; &gt; [  150.946012]  ffff88002c2e5e68 ffffffff8115e9be ffff88002c2e5e68 ffff88003a029438
&gt; &gt; [  150.946012] Call Trace:
&gt; &gt; [  150.946012]  [&lt;ffffffff81102f76&gt;] shmem_evict_inode+0x76/0x130
&gt; &gt; [  150.946012]  [&lt;ffffffff8115e9be&gt;] evict+0x7e/0x170
&gt; &gt; [  150.946012]  [&lt;ffffffff8115ee40&gt;] iput_final+0xd0/0x190
&gt; &gt; [  150.946012]  [&lt;ffffffff8115ef33&gt;] iput+0x33/0x40
&gt; &gt; [  150.946012]  [&lt;ffffffff81180205&gt;] fsnotify_destroy_mark_locked+0x145/0x160
&gt; &gt; [  150.946012]  [&lt;ffffffff81180316&gt;] fsnotify_destroy_mark+0x36/0x50
&gt; &gt; [  150.946012]  [&lt;ffffffff81181937&gt;] sys_inotify_rm_watch+0x77/0xd0
&gt; &gt; [  150.946012]  [&lt;ffffffff815aca52&gt;] system_call_fastpath+0x16/0x1b
&gt; &gt; [  150.946012] Code: 67 4a 00 b8 e4 ff ff ff eb aa 66 0f 1f 84 00 00 00 00 00 55 48 89 e5 48 83 ec 10 48 89 1c 24 4c 89 64 24 08 48 8b 9f 40 05 00 00
&gt; &gt; [  150.946012]  83 7b 70 00 74 1c 4c 8d a3 80 00 00 00 4c 89 e7 e8 d2 5d 4a
&gt; &gt; [  150.946012] RIP  [&lt;ffffffff810ffd58&gt;] shmem_free_inode+0x18/0x50
&gt; &gt; [  150.946012]  RSP &lt;ffff88002c2e5df8&gt;
&gt; &gt; [  150.946012] CR2: 0000000000000070
&gt;
&gt; Looks at aweful lot like the problem from:
&gt; http://www.spinics.net/lists/linux-fsdevel/msg46101.html
&gt;

I tried to reproduce this bug with your test program, but without success.
However, if I understand correctly, this occurs since we dont hold any locks when
we call iput() in mark_destroy(), right?
With the patches you tested, iput() is also not called within any lock, since the
groups mark_mutex is released temporarily before iput() is called.  This is, since
the original codes behaviour is similar.
However since we now have a mutex as the biggest lock, we can do what you
suggested (http://www.spinics.net/lists/linux-fsdevel/msg46107.html) and
call iput() with the mutex held to avoid the race.
The patch below implements this. It uses nested locking to avoid deadlock in case
we do the final iput() on an inode which still holds marks and thus would take
the mutex again when calling fsnotify_inode_delete() in destroy_inode().

Signed-off-by: Lino Sanfilippo &lt;LinoSanfilippo@gmx.de&gt;
Signed-off-by: Eric Paris &lt;eparis@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fsnotify: dont put marks on temporary list when clearing marks by group</title>
<updated>2012-12-11T18:44:36+00:00</updated>
<author>
<name>Lino Sanfilippo</name>
<email>LinoSanfilippo@gmx.de</email>
</author>
<published>2011-06-14T15:29:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=64c20d2a20fce295c260ea6cb3b468edfa2fb07b'/>
<id>64c20d2a20fce295c260ea6cb3b468edfa2fb07b</id>
<content type='text'>
In clear_marks_by_group_flags() the mark list of a group is iterated and the
marks are put on a temporary list.
Since we introduced fsnotify_destroy_mark_locked() we dont need the temp list
any more and are able to remove the marks while the mark list is iterated and
the mark list mutex is held.

Signed-off-by: Lino Sanfilippo &lt;LinoSanfilippo@gmx.de&gt;
Signed-off-by: Eric Paris &lt;eparis@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In clear_marks_by_group_flags() the mark list of a group is iterated and the
marks are put on a temporary list.
Since we introduced fsnotify_destroy_mark_locked() we dont need the temp list
any more and are able to remove the marks while the mark list is iterated and
the mark list mutex is held.

Signed-off-by: Lino Sanfilippo &lt;LinoSanfilippo@gmx.de&gt;
Signed-off-by: Eric Paris &lt;eparis@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fsnotify: introduce locked versions of fsnotify_add_mark() and fsnotify_remove_mark()</title>
<updated>2012-12-11T18:44:36+00:00</updated>
<author>
<name>Lino Sanfilippo</name>
<email>LinoSanfilippo@gmx.de</email>
</author>
<published>2011-06-14T15:29:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=d5a335b845792d2a69ed1e244c0b233117b7db3c'/>
<id>d5a335b845792d2a69ed1e244c0b233117b7db3c</id>
<content type='text'>
This patch introduces fsnotify_add_mark_locked() and fsnotify_remove_mark_locked()
which are essentially the same as fsnotify_add_mark() and fsnotify_remove_mark() but
assume that the caller has already taken the groups mark mutex.

Signed-off-by: Lino Sanfilippo &lt;LinoSanfilippo@gmx.de&gt;
Signed-off-by: Eric Paris &lt;eparis@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch introduces fsnotify_add_mark_locked() and fsnotify_remove_mark_locked()
which are essentially the same as fsnotify_add_mark() and fsnotify_remove_mark() but
assume that the caller has already taken the groups mark mutex.

Signed-off-by: Lino Sanfilippo &lt;LinoSanfilippo@gmx.de&gt;
Signed-off-by: Eric Paris &lt;eparis@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fsnotify: pass group to fsnotify_destroy_mark()</title>
<updated>2012-12-11T18:44:36+00:00</updated>
<author>
<name>Lino Sanfilippo</name>
<email>LinoSanfilippo@gmx.de</email>
</author>
<published>2011-06-14T15:29:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=e2a29943e9a2ee2aa737a77f550f46ba72269db4'/>
<id>e2a29943e9a2ee2aa737a77f550f46ba72269db4</id>
<content type='text'>
In fsnotify_destroy_mark() dont get the group from the passed mark anymore,
but pass the group itself as an additional parameter to the function.

Signed-off-by: Lino Sanfilippo &lt;LinoSanfilippo@gmx.de&gt;
Signed-off-by: Eric Paris &lt;eparis@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In fsnotify_destroy_mark() dont get the group from the passed mark anymore,
but pass the group itself as an additional parameter to the function.

Signed-off-by: Lino Sanfilippo &lt;LinoSanfilippo@gmx.de&gt;
Signed-off-by: Eric Paris &lt;eparis@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fsnotify: use a mutex instead of a spinlock to protect a groups mark list</title>
<updated>2012-12-11T18:29:46+00:00</updated>
<author>
<name>Lino Sanfilippo</name>
<email>LinoSanfilippo@gmx.de</email>
</author>
<published>2011-06-14T15:29:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=986ab09807ca9454c3f54aae4db7e1bb00daeed3'/>
<id>986ab09807ca9454c3f54aae4db7e1bb00daeed3</id>
<content type='text'>
Replaces the groups mark_lock spinlock with a mutex. Using a mutex instead
of a spinlock results in more flexibility (i.e it allows to sleep while the
lock is held).

Signed-off-by: Lino Sanfilippo &lt;LinoSanfilippo@gmx.de&gt;
Signed-off-by: Eric Paris &lt;eparis@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Replaces the groups mark_lock spinlock with a mutex. Using a mutex instead
of a spinlock results in more flexibility (i.e it allows to sleep while the
lock is held).

Signed-off-by: Lino Sanfilippo &lt;LinoSanfilippo@gmx.de&gt;
Signed-off-by: Eric Paris &lt;eparis@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fsnotify: take groups mark_lock before mark lock</title>
<updated>2012-12-11T18:29:45+00:00</updated>
<author>
<name>Lino Sanfilippo</name>
<email>LinoSanfilippo@gmx.de</email>
</author>
<published>2011-06-14T15:29:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=104d06f08ea59247cb0e7e548c5a5d22d21dcfd5'/>
<id>104d06f08ea59247cb0e7e548c5a5d22d21dcfd5</id>
<content type='text'>
Race-free addition and removal of a mark to a groups mark list would be easier
if we could lock the mark list of group before we lock the specific mark.
This patch changes the order used to add/remove marks to/from mark lists from

1. mark-&gt;lock
2. group-&gt;mark_lock
3. inode-&gt;i_lock

to

1. group-&gt;mark_lock
2. mark-&gt;lock
3. inode-&gt;i_lock

Signed-off-by: Lino Sanfilippo &lt;LinoSanfilippo@gmx.de&gt;
Signed-off-by: Eric Paris &lt;eparis@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Race-free addition and removal of a mark to a groups mark list would be easier
if we could lock the mark list of group before we lock the specific mark.
This patch changes the order used to add/remove marks to/from mark lists from

1. mark-&gt;lock
2. group-&gt;mark_lock
3. inode-&gt;i_lock

to

1. group-&gt;mark_lock
2. mark-&gt;lock
3. inode-&gt;i_lock

Signed-off-by: Lino Sanfilippo &lt;LinoSanfilippo@gmx.de&gt;
Signed-off-by: Eric Paris &lt;eparis@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fsnotify: use reference counting for groups</title>
<updated>2012-12-11T18:29:44+00:00</updated>
<author>
<name>Lino Sanfilippo</name>
<email>LinoSanfilippo@gmx.de</email>
</author>
<published>2011-06-14T15:29:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=23e964c284ca0a767b80a30482bd53b059d30391'/>
<id>23e964c284ca0a767b80a30482bd53b059d30391</id>
<content type='text'>
Get a group ref for each mark that is added to the groups list and release that
ref when the mark is freed in fsnotify_put_mark().
We also use get a group reference for duplicated marks and for private event
data.
Now we dont free a group any more when the number of marks becomes 0 but when
the groups ref count does. Since this will only happen when all marks are removed
from a groups mark list, we dont have to set the groups number of marks to 1 at
group creation.

Beside clearing all marks in fsnotify_destroy_group() we do also flush the
groups event queue. This is since events may hold references to groups (due to
private event data) and we have to put those references first before we get a
chance to put the final ref, which will result in a call to
fsnotify_final_destroy_group().

Signed-off-by: Lino Sanfilippo &lt;LinoSanfilippo@gmx.de&gt;
Signed-off-by: Eric Paris &lt;eparis@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Get a group ref for each mark that is added to the groups list and release that
ref when the mark is freed in fsnotify_put_mark().
We also use get a group reference for duplicated marks and for private event
data.
Now we dont free a group any more when the number of marks becomes 0 but when
the groups ref count does. Since this will only happen when all marks are removed
from a groups mark list, we dont have to set the groups number of marks to 1 at
group creation.

Beside clearing all marks in fsnotify_destroy_group() we do also flush the
groups event queue. This is since events may hold references to groups (due to
private event data) and we have to put those references first before we get a
chance to put the final ref, which will result in a call to
fsnotify_final_destroy_group().

Signed-off-by: Lino Sanfilippo &lt;LinoSanfilippo@gmx.de&gt;
Signed-off-by: Eric Paris &lt;eparis@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fsnotify: don't BUG in fsnotify_destroy_mark()</title>
<updated>2012-01-15T02:01:42+00:00</updated>
<author>
<name>Miklos Szeredi</name>
<email>mszeredi@suse.cz</email>
</author>
<published>2012-01-12T16:59:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=fed474857efbed79cd390d0aee224231ca718f63'/>
<id>fed474857efbed79cd390d0aee224231ca718f63</id>
<content type='text'>
Removing the parent of a watched file results in "kernel BUG at
fs/notify/mark.c:139".

To reproduce

  add "-w /tmp/audit/dir/watched_file" to audit.rules
  rm -rf /tmp/audit/dir

This is caused by fsnotify_destroy_mark() being called without an
extra reference taken by the caller.

Reported by Francesco Cosoleto here:

  https://bugzilla.novell.com/show_bug.cgi?id=689860

Fix by removing the BUG_ON and adding a comment about not accessing mark after
the iput.

Signed-off-by: Miklos Szeredi &lt;mszeredi@suse.cz&gt;
CC: stable@vger.kernel.org
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Removing the parent of a watched file results in "kernel BUG at
fs/notify/mark.c:139".

To reproduce

  add "-w /tmp/audit/dir/watched_file" to audit.rules
  rm -rf /tmp/audit/dir

This is caused by fsnotify_destroy_mark() being called without an
extra reference taken by the caller.

Reported by Francesco Cosoleto here:

  https://bugzilla.novell.com/show_bug.cgi?id=689860

Fix by removing the BUG_ON and adding a comment about not accessing mark after
the iput.

Signed-off-by: Miklos Szeredi &lt;mszeredi@suse.cz&gt;
CC: stable@vger.kernel.org
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>atomic: use &lt;linux/atomic.h&gt;</title>
<updated>2011-07-26T23:49:47+00:00</updated>
<author>
<name>Arun Sharma</name>
<email>asharma@fb.com</email>
</author>
<published>2011-07-26T23:09:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=60063497a95e716c9a689af3be2687d261f115b4'/>
<id>60063497a95e716c9a689af3be2687d261f115b4</id>
<content type='text'>
This allows us to move duplicated code in &lt;asm/atomic.h&gt;
(atomic_inc_not_zero() for now) to &lt;linux/atomic.h&gt;

Signed-off-by: Arun Sharma &lt;asharma@fb.com&gt;
Reviewed-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: David Miller &lt;davem@davemloft.net&gt;
Cc: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Acked-by: Mike Frysinger &lt;vapier@gentoo.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This allows us to move duplicated code in &lt;asm/atomic.h&gt;
(atomic_inc_not_zero() for now) to &lt;linux/atomic.h&gt;

Signed-off-by: Arun Sharma &lt;asharma@fb.com&gt;
Reviewed-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: David Miller &lt;davem@davemloft.net&gt;
Cc: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Acked-by: Mike Frysinger &lt;vapier@gentoo.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix common misspellings</title>
<updated>2011-03-31T14:26:23+00:00</updated>
<author>
<name>Lucas De Marchi</name>
<email>lucas.demarchi@profusion.mobi</email>
</author>
<published>2011-03-31T01:57:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=25985edcedea6396277003854657b5f3cb31a628'/>
<id>25985edcedea6396277003854657b5f3cb31a628</id>
<content type='text'>
Fixes generated by 'codespell' and manually reviewed.

Signed-off-by: Lucas De Marchi &lt;lucas.demarchi@profusion.mobi&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes generated by 'codespell' and manually reviewed.

Signed-off-by: Lucas De Marchi &lt;lucas.demarchi@profusion.mobi&gt;
</pre>
</div>
</content>
</entry>
</feed>
