aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/kernel/process.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sh/kernel/process.c')
-rw-r--r--arch/sh/kernel/process.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/sh/kernel/process.c b/arch/sh/kernel/process.c
index f2031314cb2b..4a32550fd7c6 100644
--- a/arch/sh/kernel/process.c
+++ b/arch/sh/kernel/process.c
@@ -263,6 +263,7 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long usp,
263 unsigned long unused, 263 unsigned long unused,
264 struct task_struct *p, struct pt_regs *regs) 264 struct task_struct *p, struct pt_regs *regs)
265{ 265{
266 struct thread_info *ti = task_thread_info(p);
266 struct pt_regs *childregs; 267 struct pt_regs *childregs;
267#if defined(CONFIG_SH_FPU) 268#if defined(CONFIG_SH_FPU)
268 struct task_struct *tsk = current; 269 struct task_struct *tsk = current;
@@ -277,8 +278,10 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long usp,
277 278
278 if (user_mode(regs)) { 279 if (user_mode(regs)) {
279 childregs->regs[15] = usp; 280 childregs->regs[15] = usp;
281 ti->addr_limit = USER_DS;
280 } else { 282 } else {
281 childregs->regs[15] = (unsigned long)task_stack_page(p) + THREAD_SIZE; 283 childregs->regs[15] = (unsigned long)task_stack_page(p) + THREAD_SIZE;
284 ti->addr_limit = KERNEL_DS;
282 } 285 }
283 if (clone_flags & CLONE_SETTLS) { 286 if (clone_flags & CLONE_SETTLS) {
284 childregs->gbr = childregs->regs[0]; 287 childregs->gbr = childregs->regs[0];