From c7d36dcecc08a29825175f65c4ee873ff3177a23 Mon Sep 17 00:00:00 2001 From: Adhemerval Zanella Date: Tue, 31 May 2022 17:13:35 -0300 Subject: nptl: Fix __libc_cleanup_pop_restore asynchronous restore (BZ#29214) This was due a wrong revert done on 404656009b459658. Checked on x86_64-linux-gnu. --- nptl/libc-cleanup.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'nptl/libc-cleanup.c') diff --git a/nptl/libc-cleanup.c b/nptl/libc-cleanup.c index c4a8359..2ce5938 100644 --- a/nptl/libc-cleanup.c +++ b/nptl/libc-cleanup.c @@ -57,7 +57,8 @@ __libc_cleanup_pop_restore (struct _pthread_cleanup_buffer *buffer) THREAD_SETMEM (self, cleanup, buffer->__prev); int cancelhandling = atomic_load_relaxed (&self->cancelhandling); - if (cancelhandling & CANCELTYPE_BITMASK) + if (buffer->__canceltype != PTHREAD_CANCEL_DEFERRED + && (cancelhandling & CANCELTYPE_BITMASK) == 0) { int newval; do -- cgit v1.1