From: Ralf Baechle Date: Mon, 1 Oct 2007 08:20:10 +0000 (-0700) Subject: hugetlb: fix clear_user_highpage arguments X-Git-Tag: accepted/tizen/common/20141203.182822~28228 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=281e0e3b34acb76a157576d27abc85c09fcf78e3;p=platform%2Fkernel%2Flinux-arm64.git hugetlb: fix clear_user_highpage arguments 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. Signed-off-by: Ralf Baechle Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- 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); } }