diff mbox

[5/6] ARC: clone: Ensure that @fn returns back to clone

Message ID 1403762615-25145-6-git-send-email-vgupta@synopsys.com
State Accepted
Headers show

Commit Message

Vineet Gupta June 26, 2014, 6:03 a.m. UTC
This showed up due to longstanding test/unistd/clone failure where post
clone, the callback was not exiting and rather falling thru in into main
program.

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
---
 libc/sysdeps/linux/arc/clone.S | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/libc/sysdeps/linux/arc/clone.S b/libc/sysdeps/linux/arc/clone.S
index 79ebd065ab85..9aa8d92cd7b7 100644
--- a/libc/sysdeps/linux/arc/clone.S
+++ b/libc/sysdeps/linux/arc/clone.S
@@ -49,8 +49,8 @@  ENTRY(clone)
 	blt	.L__sys_err2	; < 0 (signed) error
 	jnz	[blink]		; Parent returns
 
-	; child jumps off to @fn with @arg as argument
-	j.d	[r10]
+	; child jumps off to @fn with @arg as argument, and returns here
+	jl.d	[r10]
 	mov	r0, r11
 
 	; falls thru to _exit() with result from @fn (already in r0)