mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
[PATCH] mm: mremap correct rmap accounting
Nick Piggin points out that page accounting on MIPS multiple ZERO_PAGEs is not maintained by its move_pte, and could lead to freeing a ZERO_PAGE. Instead of complicating that move_pte, just forget the minor optimization when mremapping, and change the one thing which needed it for correctness - filemap_xip use ZERO_PAGE(0) throughout instead of according to address. [ "There is no block device driver one could use for XIP on mips platforms" - Carsten Otte ] Signed-off-by: Hugh Dickins <[email protected]> Cc: Nick Piggin <[email protected]> Cc: Andrew Morton <[email protected]> Cc: Ralf Baechle <[email protected]> Cc: Carsten Otte <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
8339f0008c
commit
701dfbc1cb
3 changed files with 2 additions and 13 deletions
|
|
@ -105,7 +105,6 @@ static void move_ptes(struct vm_area_struct *vma, pmd_t *old_pmd,
|
|||
if (pte_none(*old_pte))
|
||||
continue;
|
||||
pte = ptep_clear_flush(vma, old_addr, old_pte);
|
||||
/* ZERO_PAGE can be dependant on virtual addr */
|
||||
pte = move_pte(pte, new_vma->vm_page_prot, old_addr, new_addr);
|
||||
set_pte_at(mm, new_addr, new_pte, pte);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue