Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 71388
b: refs/heads/master
c: 3ed75eb
h: refs/heads/master
v: v3
  • Loading branch information
Coly Li authored and Linus Torvalds committed Oct 19, 2007
1 parent 2f7bd97 commit c22c2f4
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1c7037db50ebecf3d5cfbf7082daa5d97d900fef
refs/heads/master: 3ed75eb8f1cd89565966599c4f77d2edb086d5b0
2 changes: 1 addition & 1 deletion trunk/arch/ia64/mm/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@ ia64_init_addr_space (void)
vma->vm_mm = current->mm;
vma->vm_start = current->thread.rbs_bot & PAGE_MASK;
vma->vm_end = vma->vm_start + PAGE_SIZE;
vma->vm_page_prot = protection_map[VM_DATA_DEFAULT_FLAGS & 0x7];
vma->vm_flags = VM_DATA_DEFAULT_FLAGS|VM_GROWSUP|VM_ACCOUNT;
vma->vm_page_prot = vm_get_page_prot(vma->vm_flags);
down_write(&current->mm->mmap_sem);
if (insert_vm_struct(current->mm, vma)) {
up_write(&current->mm->mmap_sem);
Expand Down
2 changes: 1 addition & 1 deletion trunk/fs/exec.c
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ static int __bprm_mm_init(struct linux_binprm *bprm)
vma->vm_start = vma->vm_end - PAGE_SIZE;

vma->vm_flags = VM_STACK_FLAGS;
vma->vm_page_prot = protection_map[vma->vm_flags & 0x7];
vma->vm_page_prot = vm_get_page_prot(vma->vm_flags);
err = insert_vm_struct(mm, vma);
if (err) {
up_write(&mm->mmap_sem);
Expand Down
11 changes: 4 additions & 7 deletions trunk/mm/mmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -1048,8 +1048,7 @@ int vma_wants_writenotify(struct vm_area_struct *vma)

/* The open routine did something to the protections already? */
if (pgprot_val(vma->vm_page_prot) !=
pgprot_val(protection_map[vm_flags &
(VM_READ|VM_WRITE|VM_EXEC|VM_SHARED)]))
pgprot_val(vm_get_page_prot(vm_flags)))
return 0;

/* Specialty mapping? */
Expand Down Expand Up @@ -1130,8 +1129,7 @@ unsigned long mmap_region(struct file *file, unsigned long addr,
vma->vm_start = addr;
vma->vm_end = addr + len;
vma->vm_flags = vm_flags;
vma->vm_page_prot = protection_map[vm_flags &
(VM_READ|VM_WRITE|VM_EXEC|VM_SHARED)];
vma->vm_page_prot = vm_get_page_prot(vm_flags);
vma->vm_pgoff = pgoff;

if (file) {
Expand Down Expand Up @@ -2002,8 +2000,7 @@ unsigned long do_brk(unsigned long addr, unsigned long len)
vma->vm_end = addr + len;
vma->vm_pgoff = pgoff;
vma->vm_flags = flags;
vma->vm_page_prot = protection_map[flags &
(VM_READ|VM_WRITE|VM_EXEC|VM_SHARED)];
vma->vm_page_prot = vm_get_page_prot(flags);
vma_link(mm, vma, prev, rb_link, rb_parent);
out:
mm->total_vm += len >> PAGE_SHIFT;
Expand Down Expand Up @@ -2209,7 +2206,7 @@ int install_special_mapping(struct mm_struct *mm,
vma->vm_end = addr + len;

vma->vm_flags = vm_flags | mm->def_flags;
vma->vm_page_prot = protection_map[vma->vm_flags & 7];
vma->vm_page_prot = vm_get_page_prot(vma->vm_flags);

vma->vm_ops = &special_mapping_vmops;
vma->vm_private_data = pages;
Expand Down
6 changes: 2 additions & 4 deletions trunk/mm/mprotect.c
Original file line number Diff line number Diff line change
Expand Up @@ -192,11 +192,9 @@ mprotect_fixup(struct vm_area_struct *vma, struct vm_area_struct **pprev,
* held in write mode.
*/
vma->vm_flags = newflags;
vma->vm_page_prot = protection_map[newflags &
(VM_READ|VM_WRITE|VM_EXEC|VM_SHARED)];
vma->vm_page_prot = vm_get_page_prot(newflags);
if (vma_wants_writenotify(vma)) {
vma->vm_page_prot = protection_map[newflags &
(VM_READ|VM_WRITE|VM_EXEC)];
vma->vm_page_prot = vm_get_page_prot(newflags);
dirty_accountable = 1;
}

Expand Down

0 comments on commit c22c2f4

Please sign in to comment.