diff options
Diffstat (limited to 'arch/um/os-Linux/start_up.c')
-rw-r--r-- | arch/um/os-Linux/start_up.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/um/os-Linux/start_up.c b/arch/um/os-Linux/start_up.c index 3fc13fa8729d..46f613975c19 100644 --- a/arch/um/os-Linux/start_up.c +++ b/arch/um/os-Linux/start_up.c | |||
@@ -107,11 +107,12 @@ static int start_ptraced_child(void **stack_out) | |||
107 | unsigned long sp; | 107 | unsigned long sp; |
108 | int pid, n, status; | 108 | int pid, n, status; |
109 | 109 | ||
110 | stack = mmap(NULL, PAGE_SIZE, PROT_READ | PROT_WRITE | PROT_EXEC, | 110 | stack = mmap(NULL, UM_KERN_PAGE_SIZE, |
111 | PROT_READ | PROT_WRITE | PROT_EXEC, | ||
111 | MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); | 112 | MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); |
112 | if(stack == MAP_FAILED) | 113 | if(stack == MAP_FAILED) |
113 | fatal_perror("check_ptrace : mmap failed"); | 114 | fatal_perror("check_ptrace : mmap failed"); |
114 | sp = (unsigned long) stack + PAGE_SIZE - sizeof(void *); | 115 | sp = (unsigned long) stack + UM_KERN_PAGE_SIZE - sizeof(void *); |
115 | pid = clone(ptrace_child, (void *) sp, SIGCHLD, NULL); | 116 | pid = clone(ptrace_child, (void *) sp, SIGCHLD, NULL); |
116 | if(pid < 0) | 117 | if(pid < 0) |
117 | fatal_perror("start_ptraced_child : clone failed"); | 118 | fatal_perror("start_ptraced_child : clone failed"); |
@@ -153,7 +154,7 @@ static int stop_ptraced_child(int pid, void *stack, int exitcode, | |||
153 | ret = -1; | 154 | ret = -1; |
154 | } | 155 | } |
155 | 156 | ||
156 | if(munmap(stack, PAGE_SIZE) < 0) | 157 | if(munmap(stack, UM_KERN_PAGE_SIZE) < 0) |
157 | fatal_perror("check_ptrace : munmap failed"); | 158 | fatal_perror("check_ptrace : munmap failed"); |
158 | return ret; | 159 | return ret; |
159 | } | 160 | } |