about summary refs log tree commit diff
path: root/nptl/sysdeps
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@redhat.com>2009-11-27 21:37:30 -0800
committerPetr Baudis <pasky@ucw.cz>2009-12-04 14:52:25 +0100
commit1db8b35487c8c3842f81176c25e72e4cf0948f00 (patch)
treeaad3d850953296bb9721c260459e126004a71c08 /nptl/sysdeps
parentbc207ace446b2e0fc4a474a2a4cf945d9cca6573 (diff)
downloadglibc-1db8b35487c8c3842f81176c25e72e4cf0948f00.tar.gz
glibc-1db8b35487c8c3842f81176c25e72e4cf0948f00.tar.xz
glibc-1db8b35487c8c3842f81176c25e72e4cf0948f00.zip
Fix infloop in __pthread_disable_asynccancel on x86_64
(cherry picked from commit b55ec98c6490b944593243c7da54dda1796e3f84)
Diffstat (limited to 'nptl/sysdeps')
-rw-r--r--nptl/sysdeps/unix/sysv/linux/x86_64/cancellation.S5
1 files changed, 3 insertions, 2 deletions
diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/cancellation.S b/nptl/sysdeps/unix/sysv/linux/x86_64/cancellation.S
index 0d48ec6fcd..680696200a 100644
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/cancellation.S
+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/cancellation.S
@@ -96,8 +96,8 @@ ENTRY(__pthread_disable_asynccancel)
 	cmpxchgl %r11d, %fs:CANCELHANDLING
 	jnz	2b
 
-3:	movl	%r11d, %eax
-	andl	$(TCB_CANCELING_BITMASK|TCB_CANCELED_BITMASK), %eax
+	movl	%r11d, %eax
+3:	andl	$(TCB_CANCELING_BITMASK|TCB_CANCELED_BITMASK), %eax
 	cmpl	$TCB_CANCELING_BITMASK, %eax
 	je	4f
 1:	ret
@@ -111,5 +111,6 @@ ENTRY(__pthread_disable_asynccancel)
 	addq	$CANCELHANDLING, %rdi
 	LOAD_PRIVATE_FUTEX_WAIT (%esi)
 	syscall
+	movl	%fs:CANCELHANDLING, %eax
 	jmp	3b
 END(__pthread_disable_asynccancel)