x86: signal: cosmetic unification of handle_signal()
authorHiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
Wed, 24 Sep 2008 00:22:32 +0000 (17:22 -0700)
committerIngo Molnar <mingo@elte.hu>
Wed, 24 Sep 2008 07:35:55 +0000 (09:35 +0200)
Make handle_signal() same.

Signed-off-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/kernel/signal_32.c
arch/x86/kernel/signal_64.c

index b94463f..bb05917 100644 (file)
@@ -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.
         */
index 9087752..963236f 100644 (file)
@@ -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.