diff options
author | Richard Henderson <rth@twiddle.net> | 2017-10-31 13:53:54 +0100 |
---|---|---|
committer | Riku Voipio <riku.voipio@linaro.org> | 2017-11-07 21:58:12 +0200 |
commit | fc37dcfe1a049090e72fd3f4810f0b221cc5399c (patch) | |
tree | aa96fb6fd3710ca4a7440a0538dd37b32fd5729b /linux-user | |
parent | 2da6e76ccaf5c5aad4192fddaa2062480ad82345 (diff) |
linux-user/hppa: Fix cpu_clone_regs
By failing to return from the syscall in the child, the child
issues another clone syscall and hilarity ensues.
Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
Diffstat (limited to 'linux-user')
-rw-r--r-- | linux-user/hppa/target_cpu.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/linux-user/hppa/target_cpu.h b/linux-user/hppa/target_cpu.h index 1a5cecad3c..e50522eae9 100644 --- a/linux-user/hppa/target_cpu.h +++ b/linux-user/hppa/target_cpu.h @@ -24,7 +24,11 @@ static inline void cpu_clone_regs(CPUHPPAState *env, target_ulong newsp) if (newsp) { env->gr[30] = newsp; } + /* Indicate child in return value. */ env->gr[28] = 0; + /* Return from the syscall. */ + env->iaoq_f = env->gr[31]; + env->iaoq_b = env->gr[31] + 4; } static inline void cpu_set_tls(CPUHPPAState *env, target_ulong newtls) |