alpha: Fix clone exit syscall argument passing (BZ#21512)

Message ID 1500475732-22978-1-git-send-email-adhemerval.zanella@linaro.org
State New
Headers show

Commit Message

Adhemerval Zanella July 19, 2017, 2:48 p.m.
This patch fixes the argument passing for exit syscall after
the clone function returns on hppa.  This fixes misc/tst-clone2
on alpha-linux-gnu.

Checked misc/tst-clone2 on alpha-linux-gnu.  I will commit this shortly if
no one opposes.

	[BZ #21512]
	* sysdeps/unix/sysv/linux/alpha/clone.S (__clone): Fix argument
	passing to syscall exit.
---
 ChangeLog                             | 5 +++++
 sysdeps/unix/sysv/linux/alpha/clone.S | 1 +
 2 files changed, 6 insertions(+)

-- 
2.7.4

Comments

Richard Henderson July 20, 2017, 8:29 p.m. | #1
On 07/19/2017 04:48 AM, Adhemerval Zanella wrote:
> Checked misc/tst-clone2 on alpha-linux-gnu.  I will commit this shortly if

> no one opposes.

> 

> 	[BZ #21512]

> 	* sysdeps/unix/sysv/linux/alpha/clone.S (__clone): Fix argument

> 	passing to syscall exit.

> ---


Ok, thanks.


r~

Patch

diff --git a/sysdeps/unix/sysv/linux/alpha/clone.S b/sysdeps/unix/sysv/linux/alpha/clone.S
index 550461f..e7ee0af 100644
--- a/sysdeps/unix/sysv/linux/alpha/clone.S
+++ b/sysdeps/unix/sysv/linux/alpha/clone.S
@@ -98,6 +98,7 @@  thread_start:
 	jsr	ra, (pv)
 	ldgp	gp, 0(ra)
 
+	mov     v0, a0
 	ldiq	v0, __NR_exit
 	call_pal PAL_callsys