]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
nptl: Fix ___pthread_unregister_cancel_restore asynchronous restore
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Wed, 13 Jul 2022 13:37:32 +0000 (10:37 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Wed, 13 Jul 2022 13:44:13 +0000 (10:44 -0300)
This was due a wrong revert done on 404656009b459658.

Checked on x86_64-linux-gnu and i686-linux-gnu.

nptl/cleanup_defer.c

index eb0bc7774003280c29157cdb7e4dc06a160c8da5..4e864ead3288f8fb238c790cd441e4c181271471 100644 (file)
@@ -71,7 +71,7 @@ ___pthread_unregister_cancel_restore (__pthread_unwind_buf_t *buf)
     return;
 
   int cancelhandling = atomic_load_relaxed (&self->cancelhandling);
-  if (cancelhandling & CANCELTYPE_BITMASK)
+  if ((cancelhandling & CANCELTYPE_BITMASK) == 0)
     {
       int newval;
       do