aboutsummaryrefslogtreecommitdiff
path: root/nptl/descr.h
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2014-07-10 17:34:46 +0200
committerFlorian Weimer <fweimer@redhat.com>2014-07-11 12:30:53 +0200
commit771eb1415fde935e377111f69364a5d92a29e67d (patch)
tree1e9dd40b64e87fe715c4bc7ccee7487c6e500a8a /nptl/descr.h
parentbc1da1765e901a9a9f532f91d09f5237655e01fd (diff)
downloadglibc-771eb1415fde935e377111f69364a5d92a29e67d.tar
glibc-771eb1415fde935e377111f69364a5d92a29e67d.tar.gz
glibc-771eb1415fde935e377111f69364a5d92a29e67d.tar.bz2
glibc-771eb1415fde935e377111f69364a5d92a29e67d.zip
nptl: Fix abort in case of set*id failure [BZ #17135]
If a call to the set*id functions fails in a multi-threaded program, the abort introduced in commit 13f7fe35ae2b0ea55dc4b9628763aafdc8bdc30c was triggered. We address by checking that all calls to set*id on all threads give the same result, and only abort if we see success followed by failure (or vice versa).
Diffstat (limited to 'nptl/descr.h')
-rw-r--r--nptl/descr.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/nptl/descr.h b/nptl/descr.h
index 61d57d5732..6738591585 100644
--- a/nptl/descr.h
+++ b/nptl/descr.h
@@ -100,6 +100,7 @@ struct xid_command
int syscall_no;
long int id[3];
volatile int cntr;
+ volatile int error; /* -1: no call yet, 0: success seen, >0: error seen. */
};