Re: [bisected commit 0fc9d10] NFS-server corruption with 3.4

4 messages, 3 authors, 2012-06-06 · open the first message on its own page

Re: [bisected commit 0fc9d10] NFS-server corruption with 3.4

From: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Date: 2012-06-05 16:18:57

Konstantin Khlebnikov [off-list ref] writes:
Proper fix in attachment.
Maybe, you are going to add the stable tag for next stable?

Thanks.
radix-tree: fix contiguous iterator

From: Konstantin Khlebnikov <redacted>

This patch fixes bug in macro radix_tree_for_each_contig().
If radix_tree_next_slot() sees NULL in next slot it returns NULL, but following
radix_tree_next_chunk() switches iterating into next chunk. As result iterating
becomes non-contiguous and breaks vfs "splice" and all its users.
-- 
OGAWA Hirofumi [off-list ref]

Re: [bisected commit 0fc9d10] NFS-server corruption with 3.4

From: Konstantin Khlebnikov <hidden>
Date: 2012-06-05 16:39:20

OGAWA Hirofumi wrote:
Konstantin Khlebnikov[off-list ref]  writes:
quoted
Proper fix in attachment.
Maybe, you are going to add the stable tag for next stable?

Thanks.
Yes, this definitely must be in next stable 3.4.x , but first I'll wait for confirmation.

Guys, who can reproduce this, please check patch "radix-tree: fix contiguous iterator"
from my previous mail in this thread.
quoted
radix-tree: fix contiguous iterator

From: Konstantin Khlebnikov<redacted>

This patch fixes bug in macro radix_tree_for_each_contig().
If radix_tree_next_slot() sees NULL in next slot it returns NULL, but following
radix_tree_next_chunk() switches iterating into next chunk. As result iterating
becomes non-contiguous and breaks vfs "splice" and all its users.

Re: [bisected commit 0fc9d10] NFS-server corruption with 3.4

From: Hans de Bruin <hidden>
Date: 2012-06-05 23:32:04

On 06/05/2012 06:39 PM, Konstantin Khlebnikov wrote:
OGAWA Hirofumi wrote:
quoted
Konstantin Khlebnikov[off-list ref] writes:
quoted
Proper fix in attachment.
Maybe, you are going to add the stable tag for next stable?

Thanks.
Yes, this definitely must be in next stable 3.4.x , but first I'll wait
for confirmation.

Guys, who can reproduce this, please check patch "radix-tree: fix
contiguous iterator"
from my previous mail in this thread.
quoted
quoted
radix-tree: fix contiguous iterator

From: Konstantin Khlebnikov<redacted>

This patch fixes bug in macro radix_tree_for_each_contig().
If radix_tree_next_slot() sees NULL in next slot it returns NULL, but
following
radix_tree_next_chunk() switches iterating into next chunk. As result
iterating
becomes non-contiguous and breaks vfs "splice" and all its users.
I patched on to off v3.4 and Firefox an Thunderbird do not segfault anymore. The do not start either. This was de feature on my 'production' server I could not reproduce on my test server. Maybe it has something to with the different type of nic's.

For the second attempt I branched of at 0fc9d1040313047edf6a39fd and applied your patch on top of it. Firefox an Thunderbird where back again. So your patch works.

Now I need some git-instructions. Apparently something else is broken. I branched of with:

git branch debug 0fc9d1040313047edf6a3
git checkout debug
applied the patch.
git commit -a (got commit 5c09c685ba2d36c3b905220d43ad1b47354e456eed back)

Now I want all commits in my master branch up until ref v3.4 added to my debug branch so I can bisect between 5c09 and v3.4

-- 
Hans








Re: [bisected commit 0fc9d10] NFS-server corruption with 3.4

From: Konstantin Khlebnikov <hidden>
Date: 2012-06-06 10:55:35

Hans de Bruin wrote:
On 06/05/2012 06:39 PM, Konstantin Khlebnikov wrote:
quoted
OGAWA Hirofumi wrote:
quoted
Konstantin Khlebnikov[off-list ref]  writes:
quoted
Proper fix in attachment.
Maybe, you are going to add the stable tag for next stable?

Thanks.
Yes, this definitely must be in next stable 3.4.x , but first I'll wait
for confirmation.

Guys, who can reproduce this, please check patch "radix-tree: fix
contiguous iterator"
from my previous mail in this thread.
quoted
quoted
radix-tree: fix contiguous iterator

From: Konstantin Khlebnikov<redacted>

This patch fixes bug in macro radix_tree_for_each_contig().
If radix_tree_next_slot() sees NULL in next slot it returns NULL, but
following
radix_tree_next_chunk() switches iterating into next chunk. As result
iterating
becomes non-contiguous and breaks vfs "splice" and all its users.
I patched on to off v3.4 and Firefox an Thunderbird do not segfault
anymore. The do not start either. This was de feature on my 'production'
server I could not reproduce on my test server. Maybe it has something
to with the different type of nic's.

For the second attempt I branched of at 0fc9d1040313047edf6a39fd and
applied your patch on top of it. Firefox an Thunderbird where back
again. So your patch works.

11 more quoted lines

No, it does not work in this way. you should apply patch before each test.
You can fix radix-tree bug in find_get_pages_contig() to avoid changing
radix-tree.h and rebuild kernel faster.
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -927,7 +927,7 @@ repeat:
                 * otherwise we can get both false positives and false
                 * negatives, which is just confusing to the caller.
                 */
-               if (page->mapping == NULL || page->index != iter.index) {
+               if (page->mapping == NULL || page->index != index + ret) {
                        page_cache_release(page);
                        break;
                }
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help