diff options
Diffstat (limited to 'arch/um')
-rw-r--r-- | arch/um/kernel/init_task.c | 3 | ||||
-rw-r--r-- | arch/um/os-Linux/skas/process.c | 7 |
2 files changed, 4 insertions, 6 deletions
diff --git a/arch/um/kernel/init_task.c b/arch/um/kernel/init_task.c index cda91aa8e703..4506c7f32bac 100644 --- a/arch/um/kernel/init_task.c +++ b/arch/um/kernel/init_task.c | |||
@@ -44,8 +44,7 @@ __attribute__((__section__(".data.init_task"))) = | |||
44 | 44 | ||
45 | void unprotect_stack(unsigned long stack) | 45 | void unprotect_stack(unsigned long stack) |
46 | { | 46 | { |
47 | os_protect_memory((void *) stack, (1 << CONFIG_KERNEL_STACK_ORDER) * PAGE_SIZE, | 47 | os_protect_memory((void *) stack, THREAD_SIZE, 1, 1, 0); |
48 | 1, 1, 0); | ||
49 | } | 48 | } |
50 | 49 | ||
51 | /* | 50 | /* |
diff --git a/arch/um/os-Linux/skas/process.c b/arch/um/os-Linux/skas/process.c index 6a0e466d01e3..3492886223e1 100644 --- a/arch/um/os-Linux/skas/process.c +++ b/arch/um/os-Linux/skas/process.c | |||
@@ -490,8 +490,8 @@ void map_stub_pages(int fd, unsigned long code, | |||
490 | void new_thread(void *stack, jmp_buf *buf, void (*handler)(void)) | 490 | void new_thread(void *stack, jmp_buf *buf, void (*handler)(void)) |
491 | { | 491 | { |
492 | (*buf)[0].JB_IP = (unsigned long) handler; | 492 | (*buf)[0].JB_IP = (unsigned long) handler; |
493 | (*buf)[0].JB_SP = (unsigned long) stack + | 493 | (*buf)[0].JB_SP = (unsigned long) stack + UM_THREAD_SIZE - |
494 | (PAGE_SIZE << UML_CONFIG_KERNEL_STACK_ORDER) - sizeof(void *); | 494 | sizeof(void *); |
495 | } | 495 | } |
496 | 496 | ||
497 | #define INIT_JMP_NEW_THREAD 0 | 497 | #define INIT_JMP_NEW_THREAD 0 |
@@ -533,8 +533,7 @@ int start_idle_thread(void *stack, jmp_buf *switch_buf) | |||
533 | case INIT_JMP_NEW_THREAD: | 533 | case INIT_JMP_NEW_THREAD: |
534 | (*switch_buf)[0].JB_IP = (unsigned long) new_thread_handler; | 534 | (*switch_buf)[0].JB_IP = (unsigned long) new_thread_handler; |
535 | (*switch_buf)[0].JB_SP = (unsigned long) stack + | 535 | (*switch_buf)[0].JB_SP = (unsigned long) stack + |
536 | (PAGE_SIZE << UML_CONFIG_KERNEL_STACK_ORDER) - | 536 | UM_THREAD_SIZE - sizeof(void *); |
537 | sizeof(void *); | ||
538 | break; | 537 | break; |
539 | case INIT_JMP_CALLBACK: | 538 | case INIT_JMP_CALLBACK: |
540 | (*cb_proc)(cb_arg); | 539 | (*cb_proc)(cb_arg); |