From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934344Ab3E1Ob0 (ORCPT ); Tue, 28 May 2013 10:31:26 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41459 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934123Ab3E1ObZ (ORCPT ); Tue, 28 May 2013 10:31:25 -0400 Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 Subject: [PATCH 1/4] MN10300: Fix ret_from_kernel_thread To: torvalds@linux-foundation.com From: David Howells Cc: Al Viro , linux-am33-list@redhat.com, linux-kernel@vger.kernel.org, Ken Cox Date: Tue, 28 May 2013 15:31:22 +0100 Message-ID: <20130528143122.9479.49715.stgit@warthog.procyon.org.uk> User-Agent: StGit/0.16 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ret_from_kernel_thread needs to set A2 to the thread_info pointer before jumping to syscall_exit. Without this, we never correctly start userspace. This was caused by the rejuggling of the fork/exec paths in commit: ddf23e87a804cbf6fa3818076b33fe023cce09fd Author: Al Viro Date: Thu Oct 11 17:32:41 2012 -0400 Subject: mn10300: switch to saner kernel_execve() semantics Reported-by: Ken Cox Signed-off-by: David Howells Acked-by: Ken Cox Acked-by: Al Viro --- arch/mn10300/kernel/entry.S | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/mn10300/kernel/entry.S b/arch/mn10300/kernel/entry.S index 0c631d3..92c3eea 100644 --- a/arch/mn10300/kernel/entry.S +++ b/arch/mn10300/kernel/entry.S @@ -60,6 +60,7 @@ ENTRY(ret_from_kernel_thread) mov (REG_D0,fp),d0 mov (REG_A0,fp),a0 calls (a0) + GET_THREAD_INFO a2 # A2 must be set on return from sys_exit() jmp sys_exit ENTRY(ret_from_kernel_execve)