Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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 <ralf@linux-mips.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Ralf Baechle and committed by
Linus Torvalds
281e0e3b 8814842f

+1 -1
+1 -1
mm/hugetlb.c
··· 42 42 might_sleep(); 43 43 for (i = 0; i < (HPAGE_SIZE/PAGE_SIZE); i++) { 44 44 cond_resched(); 45 - clear_user_highpage(page + i, addr); 45 + clear_user_highpage(page + i, addr + i * PAGE_SIZE); 46 46 } 47 47 } 48 48