]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Fix infloop in __pthread_disable_asynccancel on x86_64
authorAndreas Schwab <schwab@redhat.com>
Sat, 28 Nov 2009 05:37:30 +0000 (21:37 -0800)
committerAndreas Schwab <schwab@redhat.com>
Mon, 30 Nov 2009 10:43:29 +0000 (11:43 +0100)
(cherry picked from commit b55ec98c6490b944593243c7da54dda1796e3f84)

nptl/ChangeLog
nptl/sysdeps/unix/sysv/linux/x86_64/cancellation.S

index 0aaaa3f7b98c4531506d92775f0f69b90b14f1c1..08a55ee5c8aa0cafb307e925a1825c8bd04063b0 100644 (file)
@@ -1,3 +1,8 @@
+2009-11-27  Andreas Schwab  <schwab@redhat.com>
+
+       * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Reload
+       THREAD_SELF->cancelhandling after returning from futex call.
+
 2009-11-03  Andreas Schwab  <schwab@linux-m68k.org>
 
        [BZ #4457]
index 0d48ec6fcdb9060a8a5a9764515d9714109541c3..680696200a606aa8b6b8586de342b727abddebbb 100644 (file)
@@ -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)