From: Al Viro Date: Thu, 12 Jan 2006 09:05:54 +0000 (-0800) Subject: [PATCH] m68knommu: task_stack_page() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=513091ba7e4a8b498632d7913ff9408ebbca6235;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [PATCH] m68knommu: task_stack_page() Signed-off-by: Al Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/arch/m68knommu/kernel/process.c b/arch/m68knommu/kernel/process.c index 8b3cf57ba706..99bf43824795 100644 --- a/arch/m68knommu/kernel/process.c +++ b/arch/m68knommu/kernel/process.c @@ -198,10 +198,9 @@ int copy_thread(int nr, unsigned long clone_flags, { struct pt_regs * childregs; struct switch_stack * childstack, *stack; - unsigned long stack_offset, *retp; + unsigned long *retp; - stack_offset = THREAD_SIZE - sizeof(struct pt_regs); - childregs = (struct pt_regs *) ((unsigned long) p->thread_info + stack_offset); + childregs = (struct pt_regs *) (task_stack_page(p) + THREAD_SIZE) - 1; *childregs = *regs; childregs->d0 = 0;