mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
fix mprotect vma_wants_writenotify prot
Fix mprotect bug in recent commit 3ed75eb8f1
(setup vma->vm_page_prot by vm_get_page_prot()): the vma_wants_writenotify
case was setting the same prot as when not.
Nothing wrong with the use of protection_map[] in mmap_region(),
but use vm_get_page_prot() there too in the same ~VM_SHARED way.
Signed-off-by: Hugh Dickins <[email protected]>
Cc: Coly Li <[email protected]>
Cc: Tony Luck <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
4ae3f847e4
commit
1ddd439ef9
2 changed files with 2 additions and 3 deletions
|
|
@ -194,7 +194,7 @@ success:
|
|||
vma->vm_flags = newflags;
|
||||
vma->vm_page_prot = vm_get_page_prot(newflags);
|
||||
if (vma_wants_writenotify(vma)) {
|
||||
vma->vm_page_prot = vm_get_page_prot(newflags);
|
||||
vma->vm_page_prot = vm_get_page_prot(newflags & ~VM_SHARED);
|
||||
dirty_accountable = 1;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue