diff options
-rw-r--r-- | arch/avr32/kernel/signal.c | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/arch/avr32/kernel/signal.c b/arch/avr32/kernel/signal.c index 64f886fac2ef..9c075e105d60 100644 --- a/arch/avr32/kernel/signal.c +++ b/arch/avr32/kernel/signal.c | |||
@@ -238,22 +238,21 @@ handle_signal(unsigned long sig, struct k_sigaction *ka, siginfo_t *info, | |||
238 | */ | 238 | */ |
239 | ret |= !valid_user_regs(regs); | 239 | ret |= !valid_user_regs(regs); |
240 | 240 | ||
241 | if (ret != 0) { | ||
242 | force_sigsegv(sig, current); | ||
243 | return; | ||
244 | } | ||
245 | |||
241 | /* | 246 | /* |
242 | * Block the signal if we were unsuccessful. | 247 | * Block the signal if we were successful. |
243 | */ | 248 | */ |
244 | if (ret != 0 || !(ka->sa.sa_flags & SA_NODEFER)) { | 249 | spin_lock_irq(¤t->sighand->siglock); |
245 | spin_lock_irq(¤t->sighand->siglock); | 250 | sigorsets(¤t->blocked, ¤t->blocked, |
246 | sigorsets(¤t->blocked, ¤t->blocked, | 251 | &ka->sa.sa_mask); |
247 | &ka->sa.sa_mask); | 252 | if (!(ka->sa.sa_flags & SA_NODEFER)) |
248 | sigaddset(¤t->blocked, sig); | 253 | sigaddset(¤t->blocked, sig); |
249 | recalc_sigpending(); | 254 | recalc_sigpending(); |
250 | spin_unlock_irq(¤t->sighand->siglock); | 255 | spin_unlock_irq(¤t->sighand->siglock); |
251 | } | ||
252 | |||
253 | if (ret == 0) | ||
254 | return; | ||
255 | |||
256 | force_sigsegv(sig, current); | ||
257 | } | 256 | } |
258 | 257 | ||
259 | /* | 258 | /* |