Skip to content

Commit

Permalink
hugetlb: fix clear_user_highpage arguments
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
ralfbaechle authored and Linus Torvalds committed Oct 1, 2007
1 parent 8814842 commit 281e0e3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mm/hugetlb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down

0 comments on commit 281e0e3

Please sign in to comment.