]> git.baikalelectronics.ru Git - kernel.git/commit
mm/huge_memory: fix copying user highpage
authorHillf Danton <dhillf@gmail.com>
Tue, 1 Nov 2011 00:09:38 +0000 (17:09 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 1 Nov 2011 00:30:50 +0000 (17:30 -0700)
commitbad7334e4a61123eca0d1fddd65e4b3dcb09d922
tree6e23993f320cd6b0d45a5fb4832188cd2092efe2
parent0bc647fc19ec3320a2fc69bfba1e2b92992e165f
mm/huge_memory: fix copying user highpage

The THP copy-on-write handler falls back to regular-sized pages for a huge
page replacement upon allocation failure or if THP has been individually
disabled in the target VMA.  The loop responsible for copying page-sized
chunks accidentally uses multiples of PAGE_SHIFT instead of PAGE_SIZE as
the virtual address arg for copy_user_highpage().

Signed-off-by: Hillf Danton <dhillf@gmail.com>
Acked-by: Johannes Weiner <jweiner@redhat.com>
Reviewed-by: Andrea Arcangeli <aarcange@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/huge_memory.c