mm: mmu_notifier: fix inconsistent memory between secondary MMU and host
[deliverable/linux.git] / mm / ksm.c
index 47c885368890741407eb45e8699acb12fc773aca..9638620a7530ed2b35ab381e751ab0ab90018cdb 100644 (file)
--- a/mm/ksm.c
+++ b/mm/ksm.c
@@ -1469,10 +1469,14 @@ int ksm_madvise(struct vm_area_struct *vma, unsigned long start,
                 */
                if (*vm_flags & (VM_MERGEABLE | VM_SHARED  | VM_MAYSHARE   |
                                 VM_PFNMAP    | VM_IO      | VM_DONTEXPAND |
-                                VM_RESERVED  | VM_HUGETLB | VM_INSERTPAGE |
-                                VM_NONLINEAR | VM_MIXEDMAP | VM_SAO))
+                                VM_HUGETLB | VM_NONLINEAR | VM_MIXEDMAP))
                        return 0;               /* just ignore the advice */
 
+#ifdef VM_SAO
+               if (*vm_flags & VM_SAO)
+                       return 0;
+#endif
+
                if (!test_bit(MMF_VM_MERGEABLE, &mm->flags)) {
                        err = __ksm_enter(mm);
                        if (err)
This page took 0.025256 seconds and 5 git commands to generate.