From: Andrew Morton <akpm@linux-foundation.org>
To: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-kernel@vger.kernel.org, linux-mips@linux-mips.org
Subject: Re: [PATCH] hugetlb: Fix clear_user_highpage arguments
Date: Fri, 28 Sep 2007 11:45:26 -0700 [thread overview]
Message-ID: <20070928114526.3398c462.akpm@linux-foundation.org> (raw)
In-Reply-To: <20070928163545.GA5933@linux-mips.org>
On Fri, 28 Sep 2007 17:35:45 +0100 Ralf Baechle <ralf@linux-mips.org> wrote:
> The virtual address space argument of clear_user_highpage is supposed to
> be the virtual address where the page being cleared will eventually be
> mapped. This allows architectures with virtually indexed caches a few
> clever tricks. That sort of trick falls over in painful ways if the
> virtual address argument is wrong.
yeah, but only if you're using a weird CPU architecture ;)
> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
>
> diff --git a/mm/hugetlb.c b/mm/hugetlb.c
> index 84c795e..eab8c42 100644
> --- a/mm/hugetlb.c
> +++ b/mm/hugetlb.c
> @@ -42,7 +42,7 @@ static void clear_huge_page(struct page *page, unsigned long addr)
> might_sleep();
> for (i = 0; i < (HPAGE_SIZE/PAGE_SIZE); i++) {
> cond_resched();
> - clear_user_highpage(page + i, addr);
> + clear_user_highpage(page + i, addr + i * PAGE_SIZE);
> }
> }
>
I'll add this to the 2.6.23 queue. Is it needed in 2.6.22.x?
next prev parent reply other threads:[~2007-09-28 18:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-28 16:35 [PATCH] hugetlb: Fix clear_user_highpage arguments Ralf Baechle
2007-09-28 18:45 ` Andrew Morton [this message]
2007-09-28 18:53 ` Ralf Baechle
2007-09-28 19:23 ` Andrew Morton
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=20070928114526.3398c462.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=ralf@linux-mips.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.