diff options
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/kernel/signal_32.c | 9 | ||||
-rw-r--r-- | arch/x86/kernel/signal_64.c | 2 |
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, | |||
550 | if (ret) | 550 | if (ret) |
551 | return ret; | 551 | return ret; |
552 | 552 | ||
553 | #ifdef CONFIG_X86_64 | ||
554 | /* | ||
555 | * This has nothing to do with segment registers, | ||
556 | * despite the name. This magic affects uaccess.h | ||
557 | * macros' behavior. Reset it to the normal setting. | ||
558 | */ | ||
559 | set_fs(USER_DS); | ||
560 | #endif | ||
561 | |||
553 | /* | 562 | /* |
554 | * Clear the direction flag as per the ABI for function entry. | 563 | * Clear the direction flag as per the ABI for function entry. |
555 | */ | 564 | */ |
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, | |||
346 | if (ret) | 346 | if (ret) |
347 | return ret; | 347 | return ret; |
348 | 348 | ||
349 | #ifdef CONFIG_X86_64 | ||
349 | /* | 350 | /* |
350 | * This has nothing to do with segment registers, | 351 | * This has nothing to do with segment registers, |
351 | * despite the name. This magic affects uaccess.h | 352 | * despite the name. This magic affects uaccess.h |
352 | * macros' behavior. Reset it to the normal setting. | 353 | * macros' behavior. Reset it to the normal setting. |
353 | */ | 354 | */ |
354 | set_fs(USER_DS); | 355 | set_fs(USER_DS); |
356 | #endif | ||
355 | 357 | ||
356 | /* | 358 | /* |
357 | * Clear the direction flag as per the ABI for function entry. | 359 | * Clear the direction flag as per the ABI for function entry. |