Skip to content

Commit

Permalink
uml: move register initialization
Browse files Browse the repository at this point in the history
Calling init_registers inside the skas3 checking causes mysterious crashes if
it doesn't happen because the skas3 checking is bypassed.  This patch moves it
to os_early_checks.

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Jeff Dike authored and Linus Torvalds committed Feb 5, 2008
1 parent b549883 commit 576c013
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions arch/um/os-Linux/start_up.c
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,8 @@ static void __init check_coredump_limit(void)

void __init os_early_checks(void)
{
int pid;

/* Print out the core dump limits early */
check_coredump_limit();

Expand All @@ -351,6 +353,11 @@ void __init os_early_checks(void)
* kernel is running.
*/
check_tmpexec();

pid = start_ptraced_child();
if (init_registers(pid))
fatal("Failed to initialize default registers");
stop_ptraced_child(pid, 1, 1);
}

static int __init noprocmm_cmd_param(char *str, int* add)
Expand Down Expand Up @@ -412,9 +419,6 @@ static inline void check_skas3_ptrace_faultinfo(void)
non_fatal("found\n");
}

if (init_registers(pid))
fatal("Failed to initialize default registers");

stop_ptraced_child(pid, 1, 1);
}

Expand Down

0 comments on commit 576c013

Please sign in to comment.