[PATCH 0/4] nptl: Fix Race conditions in pthread cancellation, (BZ#12683)
Adhemerval Zanella
azanella@linux.vnet.ibm.com
Fri Sep 19 13:21:00 GMT 2014
Hi all,
This patch set is the initial proposed fix for BZ#12683 [1]. This is
a large patch set and incomplete in the sense it does not implement
the required parts for *all* architectures: currently I have adjusted
only for powerpc64 and x86_64. My idea is to first get comments
about the current approach and if is feasible I will work on more
arches (initially powerpc32, i386, and x32). However it will require
arch mantainers some help and debugging to make all arch at par.
The bugzilla issue, current GLIBC code and proposed approach is described at
GLIBC wiki page [2]. My plan is to update the missing comments from
previous RFC thread (such as memory barriers in pthread_setcanceltype)
and guidelines to adjustment to missing architectures.
I pushed the patch set a sourceware.org branch [3]. One note about the
patch size: the fixes required a large rework on GLIBC internals and
I saw quite difficult to split in *concise* parts to lead to somewhat
independent parts. However, comments on to split better this set is
welcomed.
The proposed patch is divided in 4 parts:
Patch 1: Pthread cancellation cleanups and full fix for powerpc64.
Patch 2: Required fixes for x86_64.
Patch 3: Missing NPTL failures fixes.
Patch 4: Generic lowlevellock-futex.h adjustment.
The bugzilla testcases are now showing the expected result: now leak resource
in test 1 and a hangup in test2.
[1] https://sourceware.org/bugzilla/show_bug.cgi?id=12683
[2] https://sourceware.org/glibc/wiki/Release/2.21/bz12683
[3] https://sourceware.org/git/?p=glibc.git;a=shortlog;h=refs/heads/azanella/bz12683
More information about the Libc-alpha
mailing list