diff options
Diffstat (limited to 'arch/avr32')
-rw-r--r-- | arch/avr32/kernel/signal.c | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/arch/avr32/kernel/signal.c b/arch/avr32/kernel/signal.c index 8b12c3046137..0e2c0527c9fe 100644 --- a/arch/avr32/kernel/signal.c +++ b/arch/avr32/kernel/signal.c | |||
@@ -224,14 +224,14 @@ static inline void setup_syscall_restart(struct pt_regs *regs) | |||
224 | 224 | ||
225 | static inline void | 225 | static inline void |
226 | handle_signal(unsigned long sig, struct k_sigaction *ka, siginfo_t *info, | 226 | handle_signal(unsigned long sig, struct k_sigaction *ka, siginfo_t *info, |
227 | sigset_t *oldset, struct pt_regs *regs, int syscall) | 227 | struct pt_regs *regs, int syscall) |
228 | { | 228 | { |
229 | int ret; | 229 | int ret; |
230 | 230 | ||
231 | /* | 231 | /* |
232 | * Set up the stack frame | 232 | * Set up the stack frame |
233 | */ | 233 | */ |
234 | ret = setup_rt_frame(sig, ka, info, oldset, regs); | 234 | ret = setup_rt_frame(sig, ka, info, sigmask_to_save(), regs); |
235 | 235 | ||
236 | /* | 236 | /* |
237 | * Check that the resulting registers are sane | 237 | * Check that the resulting registers are sane |
@@ -255,7 +255,7 @@ handle_signal(unsigned long sig, struct k_sigaction *ka, siginfo_t *info, | |||
255 | * doesn't want to handle. Thus you cannot kill init even with a | 255 | * doesn't want to handle. Thus you cannot kill init even with a |
256 | * SIGKILL even by mistake. | 256 | * SIGKILL even by mistake. |
257 | */ | 257 | */ |
258 | int do_signal(struct pt_regs *regs, sigset_t *oldset, int syscall) | 258 | static void do_signal(struct pt_regs *regs, int syscall) |
259 | { | 259 | { |
260 | siginfo_t info; | 260 | siginfo_t info; |
261 | int signr; | 261 | int signr; |
@@ -267,12 +267,7 @@ int do_signal(struct pt_regs *regs, sigset_t *oldset, int syscall) | |||
267 | * without doing anything if so. | 267 | * without doing anything if so. |
268 | */ | 268 | */ |
269 | if (!user_mode(regs)) | 269 | if (!user_mode(regs)) |
270 | return 0; | 270 | return; |
271 | |||
272 | if (test_thread_flag(TIF_RESTORE_SIGMASK)) | ||
273 | oldset = ¤t->saved_sigmask; | ||
274 | else if (!oldset) | ||
275 | oldset = ¤t->blocked; | ||
276 | 271 | ||
277 | signr = get_signal_to_deliver(&info, &ka, regs, NULL); | 272 | signr = get_signal_to_deliver(&info, &ka, regs, NULL); |
278 | if (syscall) { | 273 | if (syscall) { |
@@ -298,11 +293,10 @@ int do_signal(struct pt_regs *regs, sigset_t *oldset, int syscall) | |||
298 | if (signr == 0) { | 293 | if (signr == 0) { |
299 | /* No signal to deliver -- put the saved sigmask back */ | 294 | /* No signal to deliver -- put the saved sigmask back */ |
300 | restore_saved_sigmask(); | 295 | restore_saved_sigmask(); |
301 | return 0; | 296 | return; |
302 | } | 297 | } |
303 | 298 | ||
304 | handle_signal(signr, &ka, &info, oldset, regs, syscall); | 299 | handle_signal(signr, &ka, &info, regs, syscall); |
305 | return 1; | ||
306 | } | 300 | } |
307 | 301 | ||
308 | asmlinkage void do_notify_resume(struct pt_regs *regs, struct thread_info *ti) | 302 | asmlinkage void do_notify_resume(struct pt_regs *regs, struct thread_info *ti) |
@@ -313,7 +307,7 @@ asmlinkage void do_notify_resume(struct pt_regs *regs, struct thread_info *ti) | |||
313 | syscall = 1; | 307 | syscall = 1; |
314 | 308 | ||
315 | if (ti->flags & (_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK)) | 309 | if (ti->flags & (_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK)) |
316 | do_signal(regs, ¤t->blocked, syscall); | 310 | do_signal(regs, syscall); |
317 | 311 | ||
318 | if (ti->flags & _TIF_NOTIFY_RESUME) { | 312 | if (ti->flags & _TIF_NOTIFY_RESUME) { |
319 | clear_thread_flag(TIF_NOTIFY_RESUME); | 313 | clear_thread_flag(TIF_NOTIFY_RESUME); |