aboutsummaryrefslogtreecommitdiffstats
path: root/fs/exec.c
diff options
context:
space:
mode:
authorColy Li <coyli@suse.de>2007-10-19 02:39:15 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-19 14:53:34 -0400
commit3ed75eb8f1cd89565966599c4f77d2edb086d5b0 (patch)
tree54e77a47b40da80d76baf5eacc2259e0bc5bdf7c /fs/exec.c
parent1c7037db50ebecf3d5cfbf7082daa5d97d900fef (diff)
setup vma->vm_page_prot by vm_get_page_prot()
This patch uses vm_get_page_prot() to setup vma->vm_page_prot. Though inside vm_get_page_prot() the protection flags is AND with (VM_READ|VM_WRITE|VM_EXEC|VM_SHARED), it does not hurt correct code. Signed-off-by: Coly Li <coyli@suse.de> Cc: Hugh Dickins <hugh@veritas.com> Cc: Tony Luck <tony.luck@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/exec.c')
-rw-r--r--fs/exec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/exec.c b/fs/exec.c
index 070ddf13cb71..0b09447ae040 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -234,7 +234,7 @@ static int __bprm_mm_init(struct linux_binprm *bprm)
234 vma->vm_start = vma->vm_end - PAGE_SIZE; 234 vma->vm_start = vma->vm_end - PAGE_SIZE;
235 235
236 vma->vm_flags = VM_STACK_FLAGS; 236 vma->vm_flags = VM_STACK_FLAGS;
237 vma->vm_page_prot = protection_map[vma->vm_flags & 0x7]; 237 vma->vm_page_prot = vm_get_page_prot(vma->vm_flags);
238 err = insert_vm_struct(mm, vma); 238 err = insert_vm_struct(mm, vma);
239 if (err) { 239 if (err) {
240 up_write(&mm->mmap_sem); 240 up_write(&mm->mmap_sem);