aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/os-Linux/helper.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/um/os-Linux/helper.c')
-rw-r--r--arch/um/os-Linux/helper.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/um/os-Linux/helper.c b/arch/um/os-Linux/helper.c
index f35220c72042..2184ddb9cb31 100644
--- a/arch/um/os-Linux/helper.c
+++ b/arch/um/os-Linux/helper.c
@@ -15,6 +15,7 @@
15#include "kern_util.h" 15#include "kern_util.h"
16#include "os.h" 16#include "os.h"
17#include "um_malloc.h" 17#include "um_malloc.h"
18#include "kern_constants.h"
18 19
19struct helper_data { 20struct helper_data {
20 void (*pre_exec)(void*); 21 void (*pre_exec)(void*);
@@ -69,7 +70,7 @@ int run_helper(void (*pre_exec)(void *), void *pre_data, char **argv,
69 goto out_close; 70 goto out_close;
70 } 71 }
71 72
72 sp = stack + page_size() - sizeof(void *); 73 sp = stack + UM_KERN_PAGE_SIZE - sizeof(void *);
73 data.pre_exec = pre_exec; 74 data.pre_exec = pre_exec;
74 data.pre_data = pre_data; 75 data.pre_data = pre_data;
75 data.argv = argv; 76 data.argv = argv;
@@ -123,7 +124,7 @@ int run_helper_thread(int (*proc)(void *), void *arg, unsigned int flags,
123 if (stack == 0) 124 if (stack == 0)
124 return -ENOMEM; 125 return -ENOMEM;
125 126
126 sp = stack + (page_size() << stack_order) - sizeof(void *); 127 sp = stack + (UM_KERN_PAGE_SIZE << stack_order) - sizeof(void *);
127 pid = clone(proc, (void *) sp, flags | SIGCHLD, arg); 128 pid = clone(proc, (void *) sp, flags | SIGCHLD, arg);
128 if (pid < 0) { 129 if (pid < 0) {
129 err = -errno; 130 err = -errno;