summaryrefslogtreecommitdiffstats
path: root/mm/memory.c
diff options
context:
space:
mode:
authorDominik Dingel <dingel@linux.vnet.ibm.com>2014-10-23 12:07:44 +0200
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2014-10-27 13:27:24 +0100
commit593befa6ab74a805e4f503c8c737c3cffa8066b6 (patch)
treecc8765c8ae5a8b26b0a618a93a6d13b4f73a1b56 /mm/memory.c
parents390/mm: recfactor global pgste updates (diff)
downloadlinux-593befa6ab74a805e4f503c8c737c3cffa8066b6.tar.xz
linux-593befa6ab74a805e4f503c8c737c3cffa8066b6.zip
mm: introduce mm_forbids_zeropage function
Add a new function stub to allow architectures to disable for an mm_structthe backing of non-present, anonymous pages with read-only empty zero pages. Signed-off-by: Dominik Dingel <dingel@linux.vnet.ibm.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'mm/memory.c')
-rw-r--r--mm/memory.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/memory.c b/mm/memory.c
index 1cc6bfbd872e..d722d4f481c9 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -2640,7 +2640,7 @@ static int do_anonymous_page(struct mm_struct *mm, struct vm_area_struct *vma,
return VM_FAULT_SIGBUS;
/* Use the zero-page for reads */
- if (!(flags & FAULT_FLAG_WRITE)) {
+ if (!(flags & FAULT_FLAG_WRITE) && !mm_forbids_zeropage(mm)) {
entry = pte_mkspecial(pfn_pte(my_zero_pfn(address),
vma->vm_page_prot));
page_table = pte_offset_map_lock(mm, pmd, address, &ptl);