diff options
author | 2007-09-25 08:54:35 -0700 | |
---|---|---|
committer | 2007-09-25 08:54:35 -0700 | |
commit | a7f3941a2cecf044f3c2975aee9c2bd423018463 (patch) | |
tree | b13598fc9acdbf2a46a8056ca9a4780af0302048 | |
parent | Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6 (diff) | |
parent | [POWERPC] Ensure FULL_REGS on exec (diff) | |
download | linux-dev-a7f3941a2cecf044f3c2975aee9c2bd423018463.tar.xz linux-dev-a7f3941a2cecf044f3c2975aee9c2bd423018463.zip |
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc:
[POWERPC] Ensure FULL_REGS on exec
-rw-r--r-- | arch/powerpc/kernel/process.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c index e477c9d0498b..8a1b001d0b11 100644 --- a/arch/powerpc/kernel/process.c +++ b/arch/powerpc/kernel/process.c @@ -605,6 +605,13 @@ void start_thread(struct pt_regs *regs, unsigned long start, unsigned long sp) regs->ccr = 0; regs->gpr[1] = sp; + /* + * We have just cleared all the nonvolatile GPRs, so make + * FULL_REGS(regs) return true. This is necessary to allow + * ptrace to examine the thread immediately after exec. + */ + regs->trap &= ~1UL; + #ifdef CONFIG_PPC32 regs->mq = 0; regs->nip = start; |