summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorCyrill Gorcunov <gorcunov@openvz.org>2010-01-13 10:16:07 +0000
committerIngo Molnar <mingo@elte.hu>2010-01-13 11:23:45 +0100
commit864a0922dd128392467611d9857e5138c6a91999 (patch)
tree1ce4f65ab7ed12d229be35de84b66ea445672522 /arch
parent42590a75019a50012f25a962246498dead428433 (diff)
downloadop-kernel-dev-864a0922dd128392467611d9857e5138c6a91999.zip
op-kernel-dev-864a0922dd128392467611d9857e5138c6a91999.tar.gz
x86: kernel_thread() -- initialize SS to a known state
Before the kernel_thread was converted into "C" we had pt_regs::ss set to __KERNEL_DS (by SAVE_ALL asm macro). Though I must admit I didn't find any *explicit* load of %ss from this structure the better to be on a safe side and set it to a known value. Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Cc: Christian Kujau <lists@nerdbynature.de> Cc: Jeremy Fitzhardinge <Jeremy.Fitzhardinge@citrix.com> Cc: Brian Gerst <brgerst@gmail.com> LKML-Reference: <1263377768-19600-1-git-send-email-ian.campbell@citrix.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/kernel/process.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c
index c6ee241..02c3ee0 100644
--- a/arch/x86/kernel/process.c
+++ b/arch/x86/kernel/process.c
@@ -288,6 +288,8 @@ int kernel_thread(int (*fn)(void *), void *arg, unsigned long flags)
regs.es = __USER_DS;
regs.fs = __KERNEL_PERCPU;
regs.gs = __KERNEL_STACK_CANARY;
+#else
+ regs.ss = __KERNEL_DS;
#endif
regs.orig_ax = -1;
OpenPOWER on IntegriCloud