Skip to content

Commit

Permalink
Fix infloop in __pthread_disable_asynccancel on x86_64
Browse files Browse the repository at this point in the history
(cherry picked from commit b55ec98)
  • Loading branch information
Andreas Schwab authored and Petr Baudis committed Dec 4, 2009
1 parent bc207ac commit 1db8b35
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 5 additions & 0 deletions nptl/ChangeLog
Original file line number Diff line number Diff line change
@@ -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]
Expand Down
5 changes: 3 additions & 2 deletions nptl/sysdeps/unix/sysv/linux/x86_64/cancellation.S
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)

0 comments on commit 1db8b35

Please sign in to comment.