<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/fs, branch v3.4.97</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>nfsd: getattr for FATTR4_WORD0_FILES_AVAIL needs the statfs buffer</title>
<updated>2014-07-07T01:49:19+00:00</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2014-05-28T08:46:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=bdef8307cc822a0121698ad619d1fdb3191795ba'/>
<id>bdef8307cc822a0121698ad619d1fdb3191795ba</id>
<content type='text'>
commit 12337901d654415d9f764b5f5ba50052e9700f37 upstream.

Note nobody's ever noticed because the typical client probably never
requests FILES_AVAIL without also requesting something else on the list.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: J. Bruce Fields &lt;bfields@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 12337901d654415d9f764b5f5ba50052e9700f37 upstream.

Note nobody's ever noticed because the typical client probably never
requests FILES_AVAIL without also requesting something else on the list.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: J. Bruce Fields &lt;bfields@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>nfsd4: fix FREE_STATEID lockowner leak</title>
<updated>2014-07-07T01:49:19+00:00</updated>
<author>
<name>J. Bruce Fields</name>
<email>bfields@redhat.com</email>
</author>
<published>2014-05-27T15:14:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=eb55ed0cdd1bcb9bfba644c1d577b8b008de92b5'/>
<id>eb55ed0cdd1bcb9bfba644c1d577b8b008de92b5</id>
<content type='text'>
commit 48385408b45523d9a432c66292d47ef43efcbb94 upstream.

27b11428b7de ("nfsd4: remove lockowner when removing lock stateid")
introduced a memory leak.

Reported-by: Jeff Layton &lt;jeff.layton@primarydata.com&gt;
Signed-off-by: J. Bruce Fields &lt;bfields@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 48385408b45523d9a432c66292d47ef43efcbb94 upstream.

27b11428b7de ("nfsd4: remove lockowner when removing lock stateid")
introduced a memory leak.

Reported-by: Jeff Layton &lt;jeff.layton@primarydata.com&gt;
Signed-off-by: J. Bruce Fields &lt;bfields@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>UBIFS: Remove incorrect assertion in shrink_tnc()</title>
<updated>2014-07-07T01:49:19+00:00</updated>
<author>
<name>hujianyang</name>
<email>hujianyang@huawei.com</email>
</author>
<published>2014-05-31T03:39:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=0834497455a06f7772e82a812e05dff446472b21'/>
<id>0834497455a06f7772e82a812e05dff446472b21</id>
<content type='text'>
commit 72abc8f4b4e8574318189886de627a2bfe6cd0da upstream.

I hit the same assert failed as Dolev Raviv reported in Kernel v3.10
shows like this:

[ 9641.164028] UBIFS assert failed in shrink_tnc at 131 (pid 13297)
[ 9641.234078] CPU: 1 PID: 13297 Comm: mmap.test Tainted: G           O 3.10.40 #1
[ 9641.234116] [&lt;c0011a6c&gt;] (unwind_backtrace+0x0/0x12c) from [&lt;c000d0b0&gt;] (show_stack+0x20/0x24)
[ 9641.234137] [&lt;c000d0b0&gt;] (show_stack+0x20/0x24) from [&lt;c0311134&gt;] (dump_stack+0x20/0x28)
[ 9641.234188] [&lt;c0311134&gt;] (dump_stack+0x20/0x28) from [&lt;bf22425c&gt;] (shrink_tnc_trees+0x25c/0x350 [ubifs])
[ 9641.234265] [&lt;bf22425c&gt;] (shrink_tnc_trees+0x25c/0x350 [ubifs]) from [&lt;bf2245ac&gt;] (ubifs_shrinker+0x25c/0x310 [ubifs])
[ 9641.234307] [&lt;bf2245ac&gt;] (ubifs_shrinker+0x25c/0x310 [ubifs]) from [&lt;c00cdad8&gt;] (shrink_slab+0x1d4/0x2f8)
[ 9641.234327] [&lt;c00cdad8&gt;] (shrink_slab+0x1d4/0x2f8) from [&lt;c00d03d0&gt;] (do_try_to_free_pages+0x300/0x544)
[ 9641.234344] [&lt;c00d03d0&gt;] (do_try_to_free_pages+0x300/0x544) from [&lt;c00d0a44&gt;] (try_to_free_pages+0x2d0/0x398)
[ 9641.234363] [&lt;c00d0a44&gt;] (try_to_free_pages+0x2d0/0x398) from [&lt;c00c6a60&gt;] (__alloc_pages_nodemask+0x494/0x7e8)
[ 9641.234382] [&lt;c00c6a60&gt;] (__alloc_pages_nodemask+0x494/0x7e8) from [&lt;c00f62d8&gt;] (new_slab+0x78/0x238)
[ 9641.234400] [&lt;c00f62d8&gt;] (new_slab+0x78/0x238) from [&lt;c031081c&gt;] (__slab_alloc.constprop.42+0x1a4/0x50c)
[ 9641.234419] [&lt;c031081c&gt;] (__slab_alloc.constprop.42+0x1a4/0x50c) from [&lt;c00f80e8&gt;] (kmem_cache_alloc_trace+0x54/0x188)
[ 9641.234459] [&lt;c00f80e8&gt;] (kmem_cache_alloc_trace+0x54/0x188) from [&lt;bf227908&gt;] (do_readpage+0x168/0x468 [ubifs])
[ 9641.234553] [&lt;bf227908&gt;] (do_readpage+0x168/0x468 [ubifs]) from [&lt;bf2296a0&gt;] (ubifs_readpage+0x424/0x464 [ubifs])
[ 9641.234606] [&lt;bf2296a0&gt;] (ubifs_readpage+0x424/0x464 [ubifs]) from [&lt;c00c17c0&gt;] (filemap_fault+0x304/0x418)
[ 9641.234638] [&lt;c00c17c0&gt;] (filemap_fault+0x304/0x418) from [&lt;c00de694&gt;] (__do_fault+0xd4/0x530)
[ 9641.234665] [&lt;c00de694&gt;] (__do_fault+0xd4/0x530) from [&lt;c00e10c0&gt;] (handle_pte_fault+0x480/0xf54)
[ 9641.234690] [&lt;c00e10c0&gt;] (handle_pte_fault+0x480/0xf54) from [&lt;c00e2bf8&gt;] (handle_mm_fault+0x140/0x184)
[ 9641.234716] [&lt;c00e2bf8&gt;] (handle_mm_fault+0x140/0x184) from [&lt;c0316688&gt;] (do_page_fault+0x150/0x3ac)
[ 9641.234737] [&lt;c0316688&gt;] (do_page_fault+0x150/0x3ac) from [&lt;c000842c&gt;] (do_DataAbort+0x3c/0xa0)
[ 9641.234759] [&lt;c000842c&gt;] (do_DataAbort+0x3c/0xa0) from [&lt;c0314e38&gt;] (__dabt_usr+0x38/0x40)

After analyzing the code, I found a condition that may cause this failed
in correct operations. Thus, I think this assertion is wrong and should be
removed.

Suppose there are two clean znodes and one dirty znode in TNC. So the
per-filesystem atomic_t @clean_zn_cnt is (2). If commit start, dirty_znode
is set to COW_ZNODE in get_znodes_to_commit() in case of potentially ops
on this znode. We clear COW bit and DIRTY bit in write_index() without
@tnc_mutex locked. We don't increase @clean_zn_cnt in this place. As the
comments in write_index() shows, if another process hold @tnc_mutex and
dirty this znode after we clean it, @clean_zn_cnt would be decreased to (1).
We will increase @clean_zn_cnt to (2) with @tnc_mutex locked in
free_obsolete_znodes() to keep it right.

If shrink_tnc() performs between decrease and increase, it will release
other 2 clean znodes it holds and found @clean_zn_cnt is less than zero
(1 - 2 = -1), then hit the assertion. Because free_obsolete_znodes() will
soon correct @clean_zn_cnt and no harm to fs in this case, I think this
assertion could be removed.

2 clean zondes and 1 dirty znode, @clean_zn_cnt == 2

Thread A (commit)         Thread B (write or others)       Thread C (shrinker)
-&gt;write_index
   -&gt;clear_bit(DIRTY_NODE)
   -&gt;clear_bit(COW_ZNODE)

            @clean_zn_cnt == 2
                          -&gt;mutex_locked(&amp;tnc_mutex)
                          -&gt;dirty_cow_znode
                              -&gt;!ubifs_zn_cow(znode)
                              -&gt;!test_and_set_bit(DIRTY_NODE)
                              -&gt;atomic_dec(&amp;clean_zn_cnt)
                          -&gt;mutex_unlocked(&amp;tnc_mutex)

            @clean_zn_cnt == 1
                                                           -&gt;mutex_locked(&amp;tnc_mutex)
                                                           -&gt;shrink_tnc
                                                             -&gt;destroy_tnc_subtree
                                                             -&gt;atomic_sub(&amp;clean_zn_cnt, 2)
                                                             -&gt;ubifs_assert  &lt;- hit
                                                           -&gt;mutex_unlocked(&amp;tnc_mutex)

            @clean_zn_cnt == -1
-&gt;mutex_lock(&amp;tnc_mutex)
-&gt;free_obsolete_znodes
   -&gt;atomic_inc(&amp;clean_zn_cnt)
-&gt;mutux_unlock(&amp;tnc_mutex)

            @clean_zn_cnt == 0 (correct after shrink)

Signed-off-by: hujianyang &lt;hujianyang@huawei.com&gt;
Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 72abc8f4b4e8574318189886de627a2bfe6cd0da upstream.

I hit the same assert failed as Dolev Raviv reported in Kernel v3.10
shows like this:

[ 9641.164028] UBIFS assert failed in shrink_tnc at 131 (pid 13297)
[ 9641.234078] CPU: 1 PID: 13297 Comm: mmap.test Tainted: G           O 3.10.40 #1
[ 9641.234116] [&lt;c0011a6c&gt;] (unwind_backtrace+0x0/0x12c) from [&lt;c000d0b0&gt;] (show_stack+0x20/0x24)
[ 9641.234137] [&lt;c000d0b0&gt;] (show_stack+0x20/0x24) from [&lt;c0311134&gt;] (dump_stack+0x20/0x28)
[ 9641.234188] [&lt;c0311134&gt;] (dump_stack+0x20/0x28) from [&lt;bf22425c&gt;] (shrink_tnc_trees+0x25c/0x350 [ubifs])
[ 9641.234265] [&lt;bf22425c&gt;] (shrink_tnc_trees+0x25c/0x350 [ubifs]) from [&lt;bf2245ac&gt;] (ubifs_shrinker+0x25c/0x310 [ubifs])
[ 9641.234307] [&lt;bf2245ac&gt;] (ubifs_shrinker+0x25c/0x310 [ubifs]) from [&lt;c00cdad8&gt;] (shrink_slab+0x1d4/0x2f8)
[ 9641.234327] [&lt;c00cdad8&gt;] (shrink_slab+0x1d4/0x2f8) from [&lt;c00d03d0&gt;] (do_try_to_free_pages+0x300/0x544)
[ 9641.234344] [&lt;c00d03d0&gt;] (do_try_to_free_pages+0x300/0x544) from [&lt;c00d0a44&gt;] (try_to_free_pages+0x2d0/0x398)
[ 9641.234363] [&lt;c00d0a44&gt;] (try_to_free_pages+0x2d0/0x398) from [&lt;c00c6a60&gt;] (__alloc_pages_nodemask+0x494/0x7e8)
[ 9641.234382] [&lt;c00c6a60&gt;] (__alloc_pages_nodemask+0x494/0x7e8) from [&lt;c00f62d8&gt;] (new_slab+0x78/0x238)
[ 9641.234400] [&lt;c00f62d8&gt;] (new_slab+0x78/0x238) from [&lt;c031081c&gt;] (__slab_alloc.constprop.42+0x1a4/0x50c)
[ 9641.234419] [&lt;c031081c&gt;] (__slab_alloc.constprop.42+0x1a4/0x50c) from [&lt;c00f80e8&gt;] (kmem_cache_alloc_trace+0x54/0x188)
[ 9641.234459] [&lt;c00f80e8&gt;] (kmem_cache_alloc_trace+0x54/0x188) from [&lt;bf227908&gt;] (do_readpage+0x168/0x468 [ubifs])
[ 9641.234553] [&lt;bf227908&gt;] (do_readpage+0x168/0x468 [ubifs]) from [&lt;bf2296a0&gt;] (ubifs_readpage+0x424/0x464 [ubifs])
[ 9641.234606] [&lt;bf2296a0&gt;] (ubifs_readpage+0x424/0x464 [ubifs]) from [&lt;c00c17c0&gt;] (filemap_fault+0x304/0x418)
[ 9641.234638] [&lt;c00c17c0&gt;] (filemap_fault+0x304/0x418) from [&lt;c00de694&gt;] (__do_fault+0xd4/0x530)
[ 9641.234665] [&lt;c00de694&gt;] (__do_fault+0xd4/0x530) from [&lt;c00e10c0&gt;] (handle_pte_fault+0x480/0xf54)
[ 9641.234690] [&lt;c00e10c0&gt;] (handle_pte_fault+0x480/0xf54) from [&lt;c00e2bf8&gt;] (handle_mm_fault+0x140/0x184)
[ 9641.234716] [&lt;c00e2bf8&gt;] (handle_mm_fault+0x140/0x184) from [&lt;c0316688&gt;] (do_page_fault+0x150/0x3ac)
[ 9641.234737] [&lt;c0316688&gt;] (do_page_fault+0x150/0x3ac) from [&lt;c000842c&gt;] (do_DataAbort+0x3c/0xa0)
[ 9641.234759] [&lt;c000842c&gt;] (do_DataAbort+0x3c/0xa0) from [&lt;c0314e38&gt;] (__dabt_usr+0x38/0x40)

After analyzing the code, I found a condition that may cause this failed
in correct operations. Thus, I think this assertion is wrong and should be
removed.

Suppose there are two clean znodes and one dirty znode in TNC. So the
per-filesystem atomic_t @clean_zn_cnt is (2). If commit start, dirty_znode
is set to COW_ZNODE in get_znodes_to_commit() in case of potentially ops
on this znode. We clear COW bit and DIRTY bit in write_index() without
@tnc_mutex locked. We don't increase @clean_zn_cnt in this place. As the
comments in write_index() shows, if another process hold @tnc_mutex and
dirty this znode after we clean it, @clean_zn_cnt would be decreased to (1).
We will increase @clean_zn_cnt to (2) with @tnc_mutex locked in
free_obsolete_znodes() to keep it right.

If shrink_tnc() performs between decrease and increase, it will release
other 2 clean znodes it holds and found @clean_zn_cnt is less than zero
(1 - 2 = -1), then hit the assertion. Because free_obsolete_znodes() will
soon correct @clean_zn_cnt and no harm to fs in this case, I think this
assertion could be removed.

2 clean zondes and 1 dirty znode, @clean_zn_cnt == 2

Thread A (commit)         Thread B (write or others)       Thread C (shrinker)
-&gt;write_index
   -&gt;clear_bit(DIRTY_NODE)
   -&gt;clear_bit(COW_ZNODE)

            @clean_zn_cnt == 2
                          -&gt;mutex_locked(&amp;tnc_mutex)
                          -&gt;dirty_cow_znode
                              -&gt;!ubifs_zn_cow(znode)
                              -&gt;!test_and_set_bit(DIRTY_NODE)
                              -&gt;atomic_dec(&amp;clean_zn_cnt)
                          -&gt;mutex_unlocked(&amp;tnc_mutex)

            @clean_zn_cnt == 1
                                                           -&gt;mutex_locked(&amp;tnc_mutex)
                                                           -&gt;shrink_tnc
                                                             -&gt;destroy_tnc_subtree
                                                             -&gt;atomic_sub(&amp;clean_zn_cnt, 2)
                                                             -&gt;ubifs_assert  &lt;- hit
                                                           -&gt;mutex_unlocked(&amp;tnc_mutex)

            @clean_zn_cnt == -1
-&gt;mutex_lock(&amp;tnc_mutex)
-&gt;free_obsolete_znodes
   -&gt;atomic_inc(&amp;clean_zn_cnt)
-&gt;mutux_unlock(&amp;tnc_mutex)

            @clean_zn_cnt == 0 (correct after shrink)

Signed-off-by: hujianyang &lt;hujianyang@huawei.com&gt;
Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>btrfs: fix use of uninit "ret" in end_extent_writepage()</title>
<updated>2014-07-01T03:01:33+00:00</updated>
<author>
<name>Eric Sandeen</name>
<email>sandeen@redhat.com</email>
</author>
<published>2014-06-12T05:39:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=e18bac2cae5d6efa474611a2dc825b7749760af4'/>
<id>e18bac2cae5d6efa474611a2dc825b7749760af4</id>
<content type='text'>
commit 3e2426bd0eb980648449e7a2f5a23e3cd3c7725c upstream.

If this condition in end_extent_writepage() is false:

	if (tree-&gt;ops &amp;&amp; tree-&gt;ops-&gt;writepage_end_io_hook)

we will then test an uninitialized "ret" at:

	ret = ret &lt; 0 ? ret : -EIO;

The test for ret is for the case where -&gt;writepage_end_io_hook
failed, and we'd choose that ret as the error; but if
there is no -&gt;writepage_end_io_hook, nothing sets ret.

Initializing ret to 0 should be sufficient; if
writepage_end_io_hook wasn't set, (!uptodate) means
non-zero err was passed in, so we choose -EIO in that case.

Signed-of-by: Eric Sandeen &lt;sandeen@redhat.com&gt;

Signed-off-by: Chris Mason &lt;clm@fb.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 3e2426bd0eb980648449e7a2f5a23e3cd3c7725c upstream.

If this condition in end_extent_writepage() is false:

	if (tree-&gt;ops &amp;&amp; tree-&gt;ops-&gt;writepage_end_io_hook)

we will then test an uninitialized "ret" at:

	ret = ret &lt; 0 ? ret : -EIO;

The test for ret is for the case where -&gt;writepage_end_io_hook
failed, and we'd choose that ret as the error; but if
there is no -&gt;writepage_end_io_hook, nothing sets ret.

Initializing ret to 0 should be sufficient; if
writepage_end_io_hook wasn't set, (!uptodate) means
non-zero err was passed in, so we choose -EIO in that case.

Signed-of-by: Eric Sandeen &lt;sandeen@redhat.com&gt;

Signed-off-by: Chris Mason &lt;clm@fb.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>Btrfs: use right type to get real comparison</title>
<updated>2014-07-01T03:01:33+00:00</updated>
<author>
<name>Liu Bo</name>
<email>bo.li.liu@oracle.com</email>
</author>
<published>2014-06-08T11:04:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=64b84ef0258d03d80d2581b7f44b7630e945e612'/>
<id>64b84ef0258d03d80d2581b7f44b7630e945e612</id>
<content type='text'>
commit cd857dd6bc2ae9ecea14e75a34e8a8fdc158e307 upstream.

We want to make sure the point is still within the extent item, not to verify
the memory it's pointing to.

Signed-off-by: Liu Bo &lt;bo.li.liu@oracle.com&gt;
Signed-off-by: Chris Mason &lt;clm@fb.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit cd857dd6bc2ae9ecea14e75a34e8a8fdc158e307 upstream.

We want to make sure the point is still within the extent item, not to verify
the memory it's pointing to.

Signed-off-by: Liu Bo &lt;bo.li.liu@oracle.com&gt;
Signed-off-by: Chris Mason &lt;clm@fb.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>fs: btrfs: volumes.c: Fix for possible null pointer dereference</title>
<updated>2014-07-01T03:01:33+00:00</updated>
<author>
<name>Rickard Strandqvist</name>
<email>rickard_strandqvist@spectrumdigital.se</email>
</author>
<published>2014-05-22T20:43:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=8f1dd63b01d0ab74032c77cad7a664da8a59dc2c'/>
<id>8f1dd63b01d0ab74032c77cad7a664da8a59dc2c</id>
<content type='text'>
commit 8321cf2596d283821acc466377c2b85bcd3422b7 upstream.

There is otherwise a risk of a possible null pointer dereference.

Was largely found by using a static code analysis program called cppcheck.

Signed-off-by: Rickard Strandqvist &lt;rickard_strandqvist@spectrumdigital.se&gt;
Signed-off-by: Chris Mason &lt;clm@fb.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 8321cf2596d283821acc466377c2b85bcd3422b7 upstream.

There is otherwise a risk of a possible null pointer dereference.

Was largely found by using a static code analysis program called cppcheck.

Signed-off-by: Rickard Strandqvist &lt;rickard_strandqvist@spectrumdigital.se&gt;
Signed-off-by: Chris Mason &lt;clm@fb.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>Btrfs: fix double free in find_lock_delalloc_range</title>
<updated>2014-07-01T03:01:33+00:00</updated>
<author>
<name>Chris Mason</name>
<email>clm@fb.com</email>
</author>
<published>2014-05-21T12:49:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=a25ebe211246ea835f165c371d744f2d65260d64'/>
<id>a25ebe211246ea835f165c371d744f2d65260d64</id>
<content type='text'>
commit 7d78874273463a784759916fc3e0b4e2eb141c70 upstream.

We need to NULL the cached_state after freeing it, otherwise
we might free it again if find_delalloc_range doesn't find anything.

Signed-off-by: Chris Mason &lt;clm@fb.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 7d78874273463a784759916fc3e0b4e2eb141c70 upstream.

We need to NULL the cached_state after freeing it, otherwise
we might free it again if find_delalloc_range doesn't find anything.

Signed-off-by: Chris Mason &lt;clm@fb.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>ext4: fix wrong assert in ext4_mb_normalize_request()</title>
<updated>2014-07-01T03:01:31+00:00</updated>
<author>
<name>Maurizio Lombardi</name>
<email>mlombard@redhat.com</email>
</author>
<published>2014-05-27T16:48:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=2dbc65d60c2ac4c77d775cd2a449738c1356baf3'/>
<id>2dbc65d60c2ac4c77d775cd2a449738c1356baf3</id>
<content type='text'>
commit b5b60778558cafad17bbcbf63e0310bd3c68eb17 upstream.

The variable "size" is expressed as number of blocks and not as
number of clusters, this could trigger a kernel panic when using
ext4 with the size of a cluster different from the size of a block.

Signed-off-by: Maurizio Lombardi &lt;mlombard@redhat.com&gt;
Signed-off-by: Theodore Ts'o &lt;tytso@mit.edu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit b5b60778558cafad17bbcbf63e0310bd3c68eb17 upstream.

The variable "size" is expressed as number of blocks and not as
number of clusters, this could trigger a kernel panic when using
ext4 with the size of a cluster different from the size of a block.

Signed-off-by: Maurizio Lombardi &lt;mlombard@redhat.com&gt;
Signed-off-by: Theodore Ts'o &lt;tytso@mit.edu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>nfsd: check passed socket's net matches NFSd superblock's one</title>
<updated>2014-06-11T19:04:19+00:00</updated>
<author>
<name>Stanislav Kinsbursky</name>
<email>skinsbursky@parallels.com</email>
</author>
<published>2014-02-26T13:50:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=a6d5f5393d055ba302edf4c59e6bfcee8b8892db'/>
<id>a6d5f5393d055ba302edf4c59e6bfcee8b8892db</id>
<content type='text'>
commit 3064639423c48d6e0eb9ecc27c512a58e38c6c57 upstream.

There could be a case, when NFSd file system is mounted in network, different
to socket's one, like below:

"ip netns exec" creates new network and mount namespace, which duplicates NFSd
mount point, created in init_net context. And thus NFS server stop in nested
network context leads to RPCBIND client destruction in init_net.
Then, on NFSd start in nested network context, rpc.nfsd process creates socket
in nested net and passes it into "write_ports", which leads to RPCBIND sockets
creation in init_net context because of the same reason (NFSd monut point was
created in init_net context). An attempt to register passed socket in nested
net leads to panic, because no RPCBIND client present in nexted network
namespace.

This patch add check that passed socket's net matches NFSd superblock's one.
And returns -EINVAL error to user psace otherwise.

v2: Put socket on exit.

Reported-by: Weng Meiling &lt;wengmeiling.weng@huawei.com&gt;
Signed-off-by: Stanislav Kinsbursky &lt;skinsbursky@parallels.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: J. Bruce Fields &lt;bfields@redhat.com&gt;
[wengmeiling: backport to 3.4: adjust context]
Signed-off-by: Weng Meiling &lt;wengmeiling.weng@huawei.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 3064639423c48d6e0eb9ecc27c512a58e38c6c57 upstream.

There could be a case, when NFSd file system is mounted in network, different
to socket's one, like below:

"ip netns exec" creates new network and mount namespace, which duplicates NFSd
mount point, created in init_net context. And thus NFS server stop in nested
network context leads to RPCBIND client destruction in init_net.
Then, on NFSd start in nested network context, rpc.nfsd process creates socket
in nested net and passes it into "write_ports", which leads to RPCBIND sockets
creation in init_net context because of the same reason (NFSd monut point was
created in init_net context). An attempt to register passed socket in nested
net leads to panic, because no RPCBIND client present in nexted network
namespace.

This patch add check that passed socket's net matches NFSd superblock's one.
And returns -EINVAL error to user psace otherwise.

v2: Put socket on exit.

Reported-by: Weng Meiling &lt;wengmeiling.weng@huawei.com&gt;
Signed-off-by: Stanislav Kinsbursky &lt;skinsbursky@parallels.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: J. Bruce Fields &lt;bfields@redhat.com&gt;
[wengmeiling: backport to 3.4: adjust context]
Signed-off-by: Weng Meiling &lt;wengmeiling.weng@huawei.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>nfsd: containerize NFSd filesystem</title>
<updated>2014-06-11T19:04:19+00:00</updated>
<author>
<name>Stanislav Kinsbursky</name>
<email>skinsbursky@parallels.com</email>
</author>
<published>2013-02-01T12:56:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=6c14fee44389ab182ceab1df8fecbf2ffeb3a641'/>
<id>6c14fee44389ab182ceab1df8fecbf2ffeb3a641</id>
<content type='text'>
note: this backport is just for the null pointer problem when
start nfsd in none init netns. The nfsd is still not containerized.

commit 11f779421a39b86da8a523d97e5fd3477878d44f upstream.

This patch makes NFSD file system superblock to be created per net.
This makes possible to get proper network namespace from superblock instead of
using hard-coded "init_net".

Note: NFSd fs super-block holds network namespace. This garantees, that
network namespace won't disappear from underneath of it.
This, obviously, means, that in case of kill of a container's "init" (which is not a mount
namespace, but network namespace creator) netowrk namespace won't be
destroyed.

Signed-off-by: Stanislav Kinsbursky &lt;skinsbursky@parallels.com&gt;
Signed-off-by: J. Bruce Fields &lt;bfields@redhat.com&gt;
[wengmeiling: backport to 3.4:
 - export cache not per netns
 - NFSD service structure not per netns]
Signed-off-by: Weng Meiling &lt;wengmeiling.weng@huawei.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
note: this backport is just for the null pointer problem when
start nfsd in none init netns. The nfsd is still not containerized.

commit 11f779421a39b86da8a523d97e5fd3477878d44f upstream.

This patch makes NFSD file system superblock to be created per net.
This makes possible to get proper network namespace from superblock instead of
using hard-coded "init_net".

Note: NFSd fs super-block holds network namespace. This garantees, that
network namespace won't disappear from underneath of it.
This, obviously, means, that in case of kill of a container's "init" (which is not a mount
namespace, but network namespace creator) netowrk namespace won't be
destroyed.

Signed-off-by: Stanislav Kinsbursky &lt;skinsbursky@parallels.com&gt;
Signed-off-by: J. Bruce Fields &lt;bfields@redhat.com&gt;
[wengmeiling: backport to 3.4:
 - export cache not per netns
 - NFSD service structure not per netns]
Signed-off-by: Weng Meiling &lt;wengmeiling.weng@huawei.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
