diff options
Diffstat (limited to 'arch/x86_64/ia32/ia32_signal.c')
-rw-r--r-- | arch/x86_64/ia32/ia32_signal.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/x86_64/ia32/ia32_signal.c b/arch/x86_64/ia32/ia32_signal.c index 490f7c1b7c84..359eacc38509 100644 --- a/arch/x86_64/ia32/ia32_signal.c +++ b/arch/x86_64/ia32/ia32_signal.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/stddef.h> | 21 | #include <linux/stddef.h> |
22 | #include <linux/personality.h> | 22 | #include <linux/personality.h> |
23 | #include <linux/compat.h> | 23 | #include <linux/compat.h> |
24 | #include <linux/binfmts.h> | ||
24 | #include <asm/ucontext.h> | 25 | #include <asm/ucontext.h> |
25 | #include <asm/uaccess.h> | 26 | #include <asm/uaccess.h> |
26 | #include <asm/i387.h> | 27 | #include <asm/i387.h> |
@@ -449,7 +450,11 @@ int ia32_setup_frame(int sig, struct k_sigaction *ka, | |||
449 | 450 | ||
450 | /* Return stub is in 32bit vsyscall page */ | 451 | /* Return stub is in 32bit vsyscall page */ |
451 | { | 452 | { |
452 | void __user *restorer = VSYSCALL32_SIGRETURN; | 453 | void __user *restorer; |
454 | if (current->binfmt->hasvdso) | ||
455 | restorer = VSYSCALL32_SIGRETURN; | ||
456 | else | ||
457 | restorer = (void *)&frame->retcode; | ||
453 | if (ka->sa.sa_flags & SA_RESTORER) | 458 | if (ka->sa.sa_flags & SA_RESTORER) |
454 | restorer = ka->sa.sa_restorer; | 459 | restorer = ka->sa.sa_restorer; |
455 | err |= __put_user(ptr_to_compat(restorer), &frame->pretcode); | 460 | err |= __put_user(ptr_to_compat(restorer), &frame->pretcode); |