diff options
Diffstat (limited to 'arch/x86/kernel/process_32.c')
-rw-r--r-- | arch/x86/kernel/process_32.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/x86/kernel/process_32.c b/arch/x86/kernel/process_32.c index 1a1ae8edc40c..d58a340e1be3 100644 --- a/arch/x86/kernel/process_32.c +++ b/arch/x86/kernel/process_32.c | |||
@@ -131,7 +131,7 @@ void __show_regs(struct pt_regs *regs, int all) | |||
131 | if (user_mode_vm(regs)) { | 131 | if (user_mode_vm(regs)) { |
132 | sp = regs->sp; | 132 | sp = regs->sp; |
133 | ss = regs->ss & 0xffff; | 133 | ss = regs->ss & 0xffff; |
134 | savesegment(gs, gs); | 134 | gs = get_user_gs(regs); |
135 | } else { | 135 | } else { |
136 | sp = (unsigned long) (®s->sp); | 136 | sp = (unsigned long) (®s->sp); |
137 | savesegment(ss, ss); | 137 | savesegment(ss, ss); |
@@ -304,7 +304,7 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long sp, | |||
304 | 304 | ||
305 | p->thread.ip = (unsigned long) ret_from_fork; | 305 | p->thread.ip = (unsigned long) ret_from_fork; |
306 | 306 | ||
307 | savesegment(gs, p->thread.gs); | 307 | task_user_gs(p) = get_user_gs(regs); |
308 | 308 | ||
309 | tsk = current; | 309 | tsk = current; |
310 | if (unlikely(test_tsk_thread_flag(tsk, TIF_IO_BITMAP))) { | 310 | if (unlikely(test_tsk_thread_flag(tsk, TIF_IO_BITMAP))) { |
@@ -342,7 +342,7 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long sp, | |||
342 | void | 342 | void |
343 | start_thread(struct pt_regs *regs, unsigned long new_ip, unsigned long new_sp) | 343 | start_thread(struct pt_regs *regs, unsigned long new_ip, unsigned long new_sp) |
344 | { | 344 | { |
345 | __asm__("movl %0, %%gs" : : "r"(0)); | 345 | set_user_gs(regs, 0); |
346 | regs->fs = 0; | 346 | regs->fs = 0; |
347 | set_fs(USER_DS); | 347 | set_fs(USER_DS); |
348 | regs->ds = __USER_DS; | 348 | regs->ds = __USER_DS; |