diff options
author | Andi Kleen <ak@suse.de> | 2007-02-13 13:26:26 +0100 |
---|---|---|
committer | Andi Kleen <andi@basil.nowhere.org> | 2007-02-13 13:26:26 +0100 |
commit | 9fbbd4dd17d0712054368e5e939e28b2456bfe1b (patch) | |
tree | 778766e35c52529ed0fc369ce1c3cf9382fc6e16 /arch/x86_64 | |
parent | 120fad72401ebec2a126c16cc48f56c28f3eefe2 (diff) | |
download | blackbird-op-linux-9fbbd4dd17d0712054368e5e939e28b2456bfe1b.tar.gz blackbird-op-linux-9fbbd4dd17d0712054368e5e939e28b2456bfe1b.zip |
[PATCH] x86: Don't require the vDSO for handling a.out signals
and in other strange binfmts. vDSO is not necessarily mapped there.
Signed-off-by: Andi Kleen <ak@suse.de>
Diffstat (limited to 'arch/x86_64')
-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 @@ #include <linux/stddef.h> #include <linux/personality.h> #include <linux/compat.h> +#include <linux/binfmts.h> #include <asm/ucontext.h> #include <asm/uaccess.h> #include <asm/i387.h> @@ -449,7 +450,11 @@ int ia32_setup_frame(int sig, struct k_sigaction *ka, /* Return stub is in 32bit vsyscall page */ { - void __user *restorer = VSYSCALL32_SIGRETURN; + void __user *restorer; + if (current->binfmt->hasvdso) + restorer = VSYSCALL32_SIGRETURN; + else + restorer = (void *)&frame->retcode; if (ka->sa.sa_flags & SA_RESTORER) restorer = ka->sa.sa_restorer; err |= __put_user(ptr_to_compat(restorer), &frame->pretcode); |