summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>2008-09-24 02:22:32 +0200
committerIngo Molnar <mingo@elte.hu>2008-09-24 09:35:55 +0200
commit86d3237cd1a09136b4fb3a1d73d3c3fd6331cb14 (patch)
tree64c5d8dedf08827326fbc66c4e48c73f064ee5a9
parentx86: signal: cosmetic unification of do_notify_resume() (diff)
downloadlinux-86d3237cd1a09136b4fb3a1d73d3c3fd6331cb14.tar.xz
linux-86d3237cd1a09136b4fb3a1d73d3c3fd6331cb14.zip
x86: signal: cosmetic unification of handle_signal()
Make handle_signal() same. Signed-off-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r--arch/x86/kernel/signal_32.c9
-rw-r--r--arch/x86/kernel/signal_64.c2
2 files changed, 11 insertions, 0 deletions
diff --git a/arch/x86/kernel/signal_32.c b/arch/x86/kernel/signal_32.c
index b94463f264b4..bb05917f232c 100644
--- a/arch/x86/kernel/signal_32.c
+++ b/arch/x86/kernel/signal_32.c
@@ -550,6 +550,15 @@ handle_signal(unsigned long sig, siginfo_t *info, struct k_sigaction *ka,
if (ret)
return ret;
+#ifdef CONFIG_X86_64
+ /*
+ * This has nothing to do with segment registers,
+ * despite the name. This magic affects uaccess.h
+ * macros' behavior. Reset it to the normal setting.
+ */
+ set_fs(USER_DS);
+#endif
+
/*
* Clear the direction flag as per the ABI for function entry.
*/
diff --git a/arch/x86/kernel/signal_64.c b/arch/x86/kernel/signal_64.c
index 9087752f4109..963236f2c3c1 100644
--- a/arch/x86/kernel/signal_64.c
+++ b/arch/x86/kernel/signal_64.c
@@ -346,12 +346,14 @@ handle_signal(unsigned long sig, siginfo_t *info, struct k_sigaction *ka,
if (ret)
return ret;
+#ifdef CONFIG_X86_64
/*
* This has nothing to do with segment registers,
* despite the name. This magic affects uaccess.h
* macros' behavior. Reset it to the normal setting.
*/
set_fs(USER_DS);
+#endif
/*
* Clear the direction flag as per the ABI for function entry.