mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-31 12:10:52 -04:00
Make sure we copy pages inserted with "vm_insert_page()" on fork
The logic that decides that a fork() might be able to avoid copying a VM area when it can be re-created by page faults didn't know about the new vm_insert_page() case. Also make some things a bit more anal wrt VM_PFNMAP. Pointed out by Hugh Dickins <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
281ab031a8
commit
4d7672b462
4 changed files with 5 additions and 3 deletions
|
|
@ -323,7 +323,7 @@ unsigned long do_mremap(unsigned long addr,
|
|||
/* We can't remap across vm area boundaries */
|
||||
if (old_len > vma->vm_end - addr)
|
||||
goto out;
|
||||
if (vma->vm_flags & VM_DONTEXPAND) {
|
||||
if (vma->vm_flags & (VM_DONTEXPAND | VM_PFNMAP)) {
|
||||
if (new_len > old_len)
|
||||
goto out;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue