aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'arch/um/kernel')
-rw-r--r--arch/um/kernel/init_task.c2
-rw-r--r--arch/um/kernel/physmem.c2
-rw-r--r--arch/um/kernel/process.c5
3 files changed, 5 insertions, 4 deletions
diff --git a/arch/um/kernel/init_task.c b/arch/um/kernel/init_task.c
index cba516e6c99a..fa90db964b28 100644
--- a/arch/um/kernel/init_task.c
+++ b/arch/um/kernel/init_task.c
@@ -47,7 +47,9 @@ union thread_union cpu0_irqstack
47 __attribute__((__section__(".data.init_irqstack"))) = 47 __attribute__((__section__(".data.init_irqstack"))) =
48 { INIT_THREAD_INFO(init_task) }; 48 { INIT_THREAD_INFO(init_task) };
49 49
50#ifdef CONFIG_MODE_TT
50void unprotect_stack(unsigned long stack) 51void unprotect_stack(unsigned long stack)
51{ 52{
52 os_protect_memory((void *) stack, THREAD_SIZE, 1, 1, 0); 53 os_protect_memory((void *) stack, THREAD_SIZE, 1, 1, 0);
53} 54}
55#endif
diff --git a/arch/um/kernel/physmem.c b/arch/um/kernel/physmem.c
index 5ee7e851bbc1..8aeac4d93511 100644
--- a/arch/um/kernel/physmem.c
+++ b/arch/um/kernel/physmem.c
@@ -105,7 +105,7 @@ void __init setup_physmem(unsigned long start, unsigned long reserve_end,
105 105
106 offset = uml_reserved - uml_physmem; 106 offset = uml_reserved - uml_physmem;
107 err = os_map_memory((void *) uml_reserved, physmem_fd, offset, 107 err = os_map_memory((void *) uml_reserved, physmem_fd, offset,
108 len - offset, 1, 1, 0); 108 len - offset, 1, 1, 1);
109 if(err < 0){ 109 if(err < 0){
110 os_print_error(err, "Mapping memory"); 110 os_print_error(err, "Mapping memory");
111 exit(1); 111 exit(1);
diff --git a/arch/um/kernel/process.c b/arch/um/kernel/process.c
index bfa52f206bb6..f083787410af 100644
--- a/arch/um/kernel/process.c
+++ b/arch/um/kernel/process.c
@@ -82,9 +82,9 @@ unsigned long alloc_stack(int order, int atomic)
82 if (atomic) 82 if (atomic)
83 flags = GFP_ATOMIC; 83 flags = GFP_ATOMIC;
84 page = __get_free_pages(flags, order); 84 page = __get_free_pages(flags, order);
85 if(page == 0) 85 if (page == 0)
86 return 0; 86 return 0;
87 stack_protections(page); 87
88 return page; 88 return page;
89} 89}
90 90
@@ -141,7 +141,6 @@ void release_thread(struct task_struct *task)
141 141
142void exit_thread(void) 142void exit_thread(void)
143{ 143{
144 unprotect_stack((unsigned long) current_thread);
145} 144}
146 145
147void *get_current(void) 146void *get_current(void)