mm/autonuma: Don't mark pte saved write in case of dirty_accountable.
Subsystems (2)
PATCH 1/1 mm/autonuma: Don't mark pte saved write in case of dirty_accountable.
We never request for protection update with ditry_accountable set and prot_numa set. Hence mark the pte with mkwrite instead mk_savedwrite.
Found this when running stress-ng test with debug check enabled. This trigger the VM_BUG_ON in pte_mk_savedwrite()
Signed-off-by Aneesh Kumar K.V <[email protected]>
--- mm/mprotect.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
mm/mprotect.c +1 -1
@@ -119,7 +119,7 @@ static unsigned long change_pte_range(struct vm_area_struct *vma, pmd_t *pmd,if (dirty_accountable &&pte_dirty (ptent) && (pte_soft_dirty (ptent) || !(vma->vm_flags &VM_SOFTDIRTY ))) { - ptent =pte_mk_savedwrite (ptent); + ptent =pte_mkwrite (ptent); }ptep_modify_prot_commit (mm, addr, pte, ptent); pages++;
Signature · 7 lines
2.7.4 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>