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 b94463f264b4d597310cf320f7b2529307424957..bb05917f232c9d0de92f7d5cb9ee0a773f7e0c5e 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 9087752f41096f911bbaf1035bafbf37aec87916..963236f2c3c1a015b03046a931875f5ad83079e0 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.