summaryrefslogtreecommitdiff
path: root/fs/exec.c
diff options
context:
space:
mode:
authorAndrew Morton <akpm@digeo.com>2003-04-12 12:56:06 -0700
committerJames Bottomley <jejb@raven.il.steeleye.com>2003-04-12 12:56:06 -0700
commit300c26525d4d64338c61d8f2fc776370afc534d6 (patch)
treeb471048d72bb0b106b04fc984fc79544ec418937 /fs/exec.c
parent2accc2e36655759c7fe8ba1afa906588777924aa (diff)
[PATCH] correct vm_page_prot on stack pages
From: David Mosberger <davidm@napali.hpl.hp.com> The patch below is needed to make it possible to map stack pages without execution permission (as we do on ia64).
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 455da3c362e5..e3d434aa3a8f 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -406,7 +406,7 @@ int setup_arg_pages(struct linux_binprm *bprm)
mpnt->vm_start = PAGE_MASK & (unsigned long) bprm->p;
mpnt->vm_end = STACK_TOP;
#endif
- mpnt->vm_page_prot = PAGE_COPY;
+ mpnt->vm_page_prot = protection_map[VM_STACK_FLAGS & 0x7];
mpnt->vm_flags = VM_STACK_FLAGS;
mpnt->vm_ops = NULL;
mpnt->vm_pgoff = 0;