diff options
-rw-r--r-- | arch/x86/ia32/ia32_signal.c | 11 | ||||
-rw-r--r-- | arch/x86/kernel/signal_32.c | 11 | ||||
-rw-r--r-- | arch/x86/kernel/signal_64.c | 5 |
3 files changed, 10 insertions, 17 deletions
diff --git a/arch/x86/ia32/ia32_signal.c b/arch/x86/ia32/ia32_signal.c index 5f42cfcc1c5a..e47bed2440ee 100644 --- a/arch/x86/ia32/ia32_signal.c +++ b/arch/x86/ia32/ia32_signal.c | |||
@@ -446,18 +446,15 @@ int ia32_setup_frame(int sig, struct k_sigaction *ka, | |||
446 | if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame))) | 446 | if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame))) |
447 | return -EFAULT; | 447 | return -EFAULT; |
448 | 448 | ||
449 | err |= __put_user(sig, &frame->sig); | 449 | if (__put_user(sig, &frame->sig)) |
450 | if (err) | ||
451 | return -EFAULT; | 450 | return -EFAULT; |
452 | 451 | ||
453 | err |= ia32_setup_sigcontext(&frame->sc, fpstate, regs, set->sig[0]); | 452 | if (ia32_setup_sigcontext(&frame->sc, fpstate, regs, set->sig[0])) |
454 | if (err) | ||
455 | return -EFAULT; | 453 | return -EFAULT; |
456 | 454 | ||
457 | if (_COMPAT_NSIG_WORDS > 1) { | 455 | if (_COMPAT_NSIG_WORDS > 1) { |
458 | err |= __copy_to_user(frame->extramask, &set->sig[1], | 456 | if (__copy_to_user(frame->extramask, &set->sig[1], |
459 | sizeof(frame->extramask)); | 457 | sizeof(frame->extramask))) |
460 | if (err) | ||
461 | return -EFAULT; | 458 | return -EFAULT; |
462 | } | 459 | } |
463 | 460 | ||
diff --git a/arch/x86/kernel/signal_32.c b/arch/x86/kernel/signal_32.c index 1c22e0067fe7..d433861a6599 100644 --- a/arch/x86/kernel/signal_32.c +++ b/arch/x86/kernel/signal_32.c | |||
@@ -351,18 +351,15 @@ __setup_frame(int sig, struct k_sigaction *ka, sigset_t *set, | |||
351 | if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame))) | 351 | if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame))) |
352 | return -EFAULT; | 352 | return -EFAULT; |
353 | 353 | ||
354 | err = __put_user(sig, &frame->sig); | 354 | if (__put_user(sig, &frame->sig)) |
355 | if (err) | ||
356 | return -EFAULT; | 355 | return -EFAULT; |
357 | 356 | ||
358 | err = setup_sigcontext(&frame->sc, fpstate, regs, set->sig[0]); | 357 | if (setup_sigcontext(&frame->sc, fpstate, regs, set->sig[0])) |
359 | if (err) | ||
360 | return -EFAULT; | 358 | return -EFAULT; |
361 | 359 | ||
362 | if (_NSIG_WORDS > 1) { | 360 | if (_NSIG_WORDS > 1) { |
363 | err = __copy_to_user(&frame->extramask, &set->sig[1], | 361 | if (__copy_to_user(&frame->extramask, &set->sig[1], |
364 | sizeof(frame->extramask)); | 362 | sizeof(frame->extramask))) |
365 | if (err) | ||
366 | return -EFAULT; | 363 | return -EFAULT; |
367 | } | 364 | } |
368 | 365 | ||
diff --git a/arch/x86/kernel/signal_64.c b/arch/x86/kernel/signal_64.c index 3b79e179ba3a..a21c85197295 100644 --- a/arch/x86/kernel/signal_64.c +++ b/arch/x86/kernel/signal_64.c | |||
@@ -210,7 +210,7 @@ static int __setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, | |||
210 | (unsigned long)fp - sizeof(struct rt_sigframe), 16) - 8; | 210 | (unsigned long)fp - sizeof(struct rt_sigframe), 16) - 8; |
211 | 211 | ||
212 | if (save_i387_xstate(fp) < 0) | 212 | if (save_i387_xstate(fp) < 0) |
213 | err |= -1; | 213 | return -EFAULT; |
214 | } else | 214 | } else |
215 | frame = get_stack(ka, regs, sizeof(struct rt_sigframe)) - 8; | 215 | frame = get_stack(ka, regs, sizeof(struct rt_sigframe)) - 8; |
216 | 216 | ||
@@ -218,8 +218,7 @@ static int __setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, | |||
218 | return -EFAULT; | 218 | return -EFAULT; |
219 | 219 | ||
220 | if (ka->sa.sa_flags & SA_SIGINFO) { | 220 | if (ka->sa.sa_flags & SA_SIGINFO) { |
221 | err |= copy_siginfo_to_user(&frame->info, info); | 221 | if (copy_siginfo_to_user(&frame->info, info)) |
222 | if (err) | ||
223 | return -EFAULT; | 222 | return -EFAULT; |
224 | } | 223 | } |
225 | 224 | ||