diff options
-rw-r--r-- | arch/um/include/os.h | 2 | ||||
-rw-r--r-- | arch/um/kernel/skas/process_kern.c | 2 | ||||
-rw-r--r-- | arch/um/kernel/tt/exec_kern.c | 2 | ||||
-rw-r--r-- | arch/um/kernel/tt/process_kern.c | 2 | ||||
-rw-r--r-- | arch/um/os-Linux/process.c | 19 | ||||
-rw-r--r-- | arch/um/os-Linux/skas/process.c | 2 |
6 files changed, 14 insertions, 15 deletions
diff --git a/arch/um/include/os.h b/arch/um/include/os.h index f88856c28a66..700f7a76c822 100644 --- a/arch/um/include/os.h +++ b/arch/um/include/os.h | |||
@@ -199,7 +199,7 @@ extern int os_getpid(void); | |||
199 | extern int os_getpgrp(void); | 199 | extern int os_getpgrp(void); |
200 | 200 | ||
201 | extern void init_new_thread_stack(void *sig_stack, void (*usr1_handler)(int)); | 201 | extern void init_new_thread_stack(void *sig_stack, void (*usr1_handler)(int)); |
202 | extern void init_new_thread_signals(int altstack); | 202 | extern void init_new_thread_signals(void); |
203 | extern int run_kernel_thread(int (*fn)(void *), void *arg, void **jmp_ptr); | 203 | extern int run_kernel_thread(int (*fn)(void *), void *arg, void **jmp_ptr); |
204 | 204 | ||
205 | extern int os_map_memory(void *virt, int fd, unsigned long long off, | 205 | extern int os_map_memory(void *virt, int fd, unsigned long long off, |
diff --git a/arch/um/kernel/skas/process_kern.c b/arch/um/kernel/skas/process_kern.c index 2135eaf98a93..55caeec8b257 100644 --- a/arch/um/kernel/skas/process_kern.c +++ b/arch/um/kernel/skas/process_kern.c | |||
@@ -177,7 +177,7 @@ int start_uml_skas(void) | |||
177 | if(proc_mm) | 177 | if(proc_mm) |
178 | userspace_pid[0] = start_userspace(0); | 178 | userspace_pid[0] = start_userspace(0); |
179 | 179 | ||
180 | init_new_thread_signals(1); | 180 | init_new_thread_signals(); |
181 | 181 | ||
182 | init_task.thread.request.u.thread.proc = start_kernel_proc; | 182 | init_task.thread.request.u.thread.proc = start_kernel_proc; |
183 | init_task.thread.request.u.thread.arg = NULL; | 183 | init_task.thread.request.u.thread.arg = NULL; |
diff --git a/arch/um/kernel/tt/exec_kern.c b/arch/um/kernel/tt/exec_kern.c index 5c1e4cc1c049..ad66df17d9d7 100644 --- a/arch/um/kernel/tt/exec_kern.c +++ b/arch/um/kernel/tt/exec_kern.c | |||
@@ -21,7 +21,7 @@ | |||
21 | static int exec_tramp(void *sig_stack) | 21 | static int exec_tramp(void *sig_stack) |
22 | { | 22 | { |
23 | init_new_thread_stack(sig_stack, NULL); | 23 | init_new_thread_stack(sig_stack, NULL); |
24 | init_new_thread_signals(1); | 24 | init_new_thread_signals(); |
25 | os_stop_process(os_getpid()); | 25 | os_stop_process(os_getpid()); |
26 | return(0); | 26 | return(0); |
27 | } | 27 | } |
diff --git a/arch/um/kernel/tt/process_kern.c b/arch/um/kernel/tt/process_kern.c index 8368c2dbe635..1e86f0bfef72 100644 --- a/arch/um/kernel/tt/process_kern.c +++ b/arch/um/kernel/tt/process_kern.c | |||
@@ -142,7 +142,7 @@ static void new_thread_handler(int sig) | |||
142 | schedule_tail(current->thread.prev_sched); | 142 | schedule_tail(current->thread.prev_sched); |
143 | current->thread.prev_sched = NULL; | 143 | current->thread.prev_sched = NULL; |
144 | 144 | ||
145 | init_new_thread_signals(1); | 145 | init_new_thread_signals(); |
146 | enable_timer(); | 146 | enable_timer(); |
147 | free_page(current->thread.temp_stack); | 147 | free_page(current->thread.temp_stack); |
148 | set_cmdline("(kernel thread)"); | 148 | set_cmdline("(kernel thread)"); |
diff --git a/arch/um/os-Linux/process.c b/arch/um/os-Linux/process.c index 233be2f4f8cb..b1cda818f5b5 100644 --- a/arch/um/os-Linux/process.c +++ b/arch/um/os-Linux/process.c | |||
@@ -250,25 +250,24 @@ void init_new_thread_stack(void *sig_stack, void (*usr1_handler)(int)) | |||
250 | if(usr1_handler) set_handler(SIGUSR1, usr1_handler, flags, -1); | 250 | if(usr1_handler) set_handler(SIGUSR1, usr1_handler, flags, -1); |
251 | } | 251 | } |
252 | 252 | ||
253 | void init_new_thread_signals(int altstack) | 253 | void init_new_thread_signals(void) |
254 | { | 254 | { |
255 | int flags = altstack ? SA_ONSTACK : 0; | 255 | set_handler(SIGSEGV, (__sighandler_t) sig_handler, SA_ONSTACK, |
256 | |||
257 | set_handler(SIGSEGV, (__sighandler_t) sig_handler, flags, | ||
258 | SIGUSR1, SIGIO, SIGWINCH, SIGALRM, SIGVTALRM, -1); | 256 | SIGUSR1, SIGIO, SIGWINCH, SIGALRM, SIGVTALRM, -1); |
259 | set_handler(SIGTRAP, (__sighandler_t) sig_handler, flags, | 257 | set_handler(SIGTRAP, (__sighandler_t) sig_handler, SA_ONSTACK, |
260 | SIGUSR1, SIGIO, SIGWINCH, SIGALRM, SIGVTALRM, -1); | 258 | SIGUSR1, SIGIO, SIGWINCH, SIGALRM, SIGVTALRM, -1); |
261 | set_handler(SIGFPE, (__sighandler_t) sig_handler, flags, | 259 | set_handler(SIGFPE, (__sighandler_t) sig_handler, SA_ONSTACK, |
262 | SIGUSR1, SIGIO, SIGWINCH, SIGALRM, SIGVTALRM, -1); | 260 | SIGUSR1, SIGIO, SIGWINCH, SIGALRM, SIGVTALRM, -1); |
263 | set_handler(SIGILL, (__sighandler_t) sig_handler, flags, | 261 | set_handler(SIGILL, (__sighandler_t) sig_handler, SA_ONSTACK, |
264 | SIGUSR1, SIGIO, SIGWINCH, SIGALRM, SIGVTALRM, -1); | 262 | SIGUSR1, SIGIO, SIGWINCH, SIGALRM, SIGVTALRM, -1); |
265 | set_handler(SIGBUS, (__sighandler_t) sig_handler, flags, | 263 | set_handler(SIGBUS, (__sighandler_t) sig_handler, SA_ONSTACK, |
266 | SIGUSR1, SIGIO, SIGWINCH, SIGALRM, SIGVTALRM, -1); | 264 | SIGUSR1, SIGIO, SIGWINCH, SIGALRM, SIGVTALRM, -1); |
267 | set_handler(SIGUSR2, (__sighandler_t) sig_handler, | 265 | set_handler(SIGUSR2, (__sighandler_t) sig_handler, |
268 | flags, SIGUSR1, SIGIO, SIGWINCH, SIGALRM, SIGVTALRM, -1); | 266 | SA_ONSTACK, SIGUSR1, SIGIO, SIGWINCH, SIGALRM, SIGVTALRM, |
267 | -1); | ||
269 | signal(SIGHUP, SIG_IGN); | 268 | signal(SIGHUP, SIG_IGN); |
270 | 269 | ||
271 | init_irq_signals(altstack); | 270 | init_irq_signals(1); |
272 | } | 271 | } |
273 | 272 | ||
274 | int run_kernel_thread(int (*fn)(void *), void *arg, void **jmp_ptr) | 273 | int run_kernel_thread(int (*fn)(void *), void *arg, void **jmp_ptr) |
diff --git a/arch/um/os-Linux/skas/process.c b/arch/um/os-Linux/skas/process.c index bd89c6b99d5d..bf35572d9cfa 100644 --- a/arch/um/os-Linux/skas/process.c +++ b/arch/um/os-Linux/skas/process.c | |||
@@ -159,7 +159,7 @@ static int userspace_tramp(void *stack) | |||
159 | 159 | ||
160 | ptrace(PTRACE_TRACEME, 0, 0, 0); | 160 | ptrace(PTRACE_TRACEME, 0, 0, 0); |
161 | 161 | ||
162 | init_new_thread_signals(1); | 162 | init_new_thread_signals(); |
163 | enable_timer(); | 163 | enable_timer(); |
164 | 164 | ||
165 | if(!proc_mm){ | 165 | if(!proc_mm){ |