diff options
author | Malte Skarupke <malteskarupke@fastmail.fm> | 2024-12-04 08:05:40 -0500 |
---|---|---|
committer | Carlos O'Donell <carlos@redhat.com> | 2025-01-17 14:56:58 -0500 |
commit | 91bb902f58264a2fd50fbce8f39a9a290dd23706 (patch) | |
tree | 908d07252271d0325dbbceebd40ae67d104aaddc /advisories/GLIBC-SA-2024-0001 | |
parent | 4b79e27a5073c02f6bff9aa8f4791230a0ab1867 (diff) | |
download | glibc-master.zip glibc-master.tar.gz glibc-master.tar.bz2 |
The LSB of g_signals was unused. The LSB of g1_start was used to indicate
which group is G2. This was used to always go to sleep in pthread_cond_wait
if a waiter is in G2. A comment earlier in the file says that this is not
correct to do:
"Waiters cannot determine whether they are currently in G2 or G1 -- but they
do not have to because all they are interested in is whether there are
available signals"
I either would have had to update the comment, or get rid of the check. I
chose to get rid of the check. In fact I don't quite know why it was there.
There will never be available signals for group G2, so we didn't need the
special case. Even if there were, this would just be a spurious wake. This
might have caught some cases where the count has wrapped around, but it
wouldn't reliably do that, (and even if it did, why would you want to force a
sleep in that case?) and we don't support that many concurrent waiters
anyway. Getting rid of it allows us to use one more bit, making us more
robust to wraparound.
Signed-off-by: Malte Skarupke <malteskarupke@fastmail.fm>
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Diffstat (limited to 'advisories/GLIBC-SA-2024-0001')
0 files changed, 0 insertions, 0 deletions