From: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
To: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Hugh Dickins <hughd@google.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
Michal Hocko <mhocko@suse.cz>,
Andrea Arcangeli <aarcange@redhat.com>,
Martin Schwidefsky <schwidefsky@de.ibm.com>
Subject: Re: [PATCH] mm/hugetlb: use pmd_page() in follow_huge_pmd()
Date: Fri, 10 Apr 2015 00:08:42 +0000 [thread overview]
Message-ID: <20150410000814.GA3623@hori1.linux.bs1.fc.nec.co.jp> (raw)
In-Reply-To: <1428595895-24140-1-git-send-email-gerald.schaefer@de.ibm.com>
On Thu, Apr 09, 2015 at 06:11:35PM +0200, Gerald Schaefer wrote:
> commit 61f77eda "mm/hugetlb: reduce arch dependent code around follow_huge_*"
> broke follow_huge_pmd() on s390, where pmd and pte layout differ and using
> pte_page() on a huge pmd will return wrong results. Using pmd_page() instead
> fixes this.
>
> All architectures that were touched by commit 61f77eda have pmd_page()
> defined, so this should not break anything on other architectures.
>
> Signed-off-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Thank you for the report. This looks good to me.
Acked-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
> Cc: stable@vger.kernel.org # v3.12
> ---
> mm/hugetlb.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/mm/hugetlb.c b/mm/hugetlb.c
> index e8c92ae..271e443 100644
> --- a/mm/hugetlb.c
> +++ b/mm/hugetlb.c
> @@ -3865,8 +3865,7 @@ retry:
> if (!pmd_huge(*pmd))
> goto out;
> if (pmd_present(*pmd)) {
> - page = pte_page(*(pte_t *)pmd) +
> - ((address & ~PMD_MASK) >> PAGE_SHIFT);
> + page = pmd_page(*pmd) + ((address & ~PMD_MASK) >> PAGE_SHIFT);
> if (flags & FOLL_GET)
> get_page(page);
> } else {
> --
> 2.1.4
>
--
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/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
prev parent reply other threads:[~2015-04-10 0:18 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-09 16:11 Gerald Schaefer
2015-04-09 19:41 ` David Rientjes
2015-04-10 8:08 ` Gerald Schaefer
2015-04-10 20:38 ` Andrew Morton
2015-04-23 7:46 ` Jiri Slaby
2015-04-10 0:08 ` Naoya Horiguchi [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=20150410000814.GA3623@hori1.linux.bs1.fc.nec.co.jp \
--to=n-horiguchi@ah.jp.nec.com \
--cc=aarcange@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=gerald.schaefer@de.ibm.com \
--cc=hughd@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.cz \
--cc=schwidefsky@de.ibm.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