From: Ilya Dryomov <idryomov@gmail.com>
To: Andrea Arcangeli <aarcange@redhat.com>
Cc: linux-mm@kvack.org, Rik van Riel <riel@redhat.com>,
linux-kernel@vger.kernel.org, idryomov@gmail.com
Subject: Re: [BUG] BUG: unable to handle kernel paging request at fffba000
Date: Thu, 20 Jan 2011 00:49:50 +0200 [thread overview]
Message-ID: <20110119224950.GA3429@kwango.lan.net> (raw)
In-Reply-To: <20110119221909.GO9506@random.random>
On Wed, Jan 19, 2011 at 11:19:09PM +0100, Andrea Arcangeli wrote:
> Hello Ilya,
>
> thanks for sending me the gdb info too.
>
> can you test this fix? Thanks a lot! (it only affected x86 32bit
> builds with highpte enabled)
>
> ====
> Subject: fix pte_unmap in khugepaged for highpte x86_32
>
> From: Andrea Arcangeli <aarcange@redhat.com>
>
> __collapse_huge_page_copy is still dereferencing the pte passed as parameter so
> we must pte_unmap after __collapse_huge_page_copy returns, not before.
>
> Signed-off-by: Andrea Arcangeli <aarcange@redhat.com>
It fixes the above problem for me. Thanks a lot Andrea.
> ---
>
> diff --git a/mm/huge_memory.c b/mm/huge_memory.c
> index 004c9c2..c4f634b 100644
> --- a/mm/huge_memory.c
> +++ b/mm/huge_memory.c
> @@ -1837,9 +1837,9 @@ static void collapse_huge_page(struct mm_struct *mm,
> spin_lock(ptl);
> isolated = __collapse_huge_page_isolate(vma, address, pte);
> spin_unlock(ptl);
> - pte_unmap(pte);
>
> if (unlikely(!isolated)) {
> + pte_unmap(pte);
> spin_lock(&mm->page_table_lock);
> BUG_ON(!pmd_none(*pmd));
> set_pmd_at(mm, address, pmd, _pmd);
> @@ -1856,6 +1856,7 @@ static void collapse_huge_page(struct mm_struct *mm,
> anon_vma_unlock(vma->anon_vma);
>
> __collapse_huge_page_copy(pte, new_page, vma, address, ptl);
> + pte_unmap(pte);
> __SetPageUptodate(new_page);
> pgtable = pmd_pgtable(_pmd);
> VM_BUG_ON(page_count(pgtable) != 1);
>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom policy in Canada: sign http://dissolvethecrtc.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
prev parent reply other threads:[~2011-01-19 22:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-19 12:40 Ilya Dryomov
2011-01-19 20:01 ` Andrea Arcangeli
2011-01-19 22:19 ` Andrea Arcangeli
2011-01-19 22:49 ` Ilya Dryomov [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110119224950.GA3429@kwango.lan.net \
--to=idryomov@gmail.com \
--cc=aarcange@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=riel@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox