]> Pileus Git - ~andy/linux/blobdiff - mm/memcontrol.c
SELinux: do not allocate stack space for AVC data unless needed
[~andy/linux] / mm / memcontrol.c
index b2ee6df0e9bb31eebd3b2f1528cbbcccb2b9c43e..7d698df4a067ce591fd661f45e098610e1a027db 100644 (file)
@@ -5306,6 +5306,8 @@ static int mem_cgroup_count_precharge_pte_range(pmd_t *pmd,
                return 0;
        }
 
+       if (pmd_trans_unstable(pmd))
+               return 0;
        pte = pte_offset_map_lock(vma->vm_mm, pmd, addr, &ptl);
        for (; addr != end; pte++, addr += PAGE_SIZE)
                if (get_mctgt_type(vma, addr, *pte, NULL))
@@ -5502,6 +5504,8 @@ static int mem_cgroup_move_charge_pte_range(pmd_t *pmd,
                return 0;
        }
 
+       if (pmd_trans_unstable(pmd))
+               return 0;
 retry:
        pte = pte_offset_map_lock(vma->vm_mm, pmd, addr, &ptl);
        for (; addr != end; addr += PAGE_SIZE) {