public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Panu Matilainen <pmatilai@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/rpm] pmatilai-v6: Fix excessive TLS use, part II (#1722181)
Date: Mon, 23 Nov 2026 09:32:50 GMT [thread overview]
Message-ID: <179542637080.1.459256694194465786.rpms-rpm-70d62ac48f69@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/rpm
Branch : pmatilai-v6
Commit : 70d62ac48f690dc037ed51a1b4546e484b9cc9c7
Author : Panu Matilainen <pmatilai@redhat.com>
Date : 2019-06-20T15:15:06+03:00
Stats : +54/-1 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/rpm/c/70d62ac48f690dc037ed51a1b4546e484b9cc9c7?branch=pmatilai-v6
Log:
Fix excessive TLS use, part II (#1722181)
---
diff --git a/0001-Fix-excessive-use-of-thread-local-storage-RhBug-1722.patch b/0001-Fix-excessive-use-of-thread-local-storage-RhBug-1722.patch
new file mode 100644
index 0000000..ba74528
--- /dev/null
+++ b/0001-Fix-excessive-use-of-thread-local-storage-RhBug-1722.patch
@@ -0,0 +1,49 @@
+From b39bd1965ed2fdeadb427648ec7e911613c8398f Mon Sep 17 00:00:00 2001
+Message-Id: <b39bd1965ed2fdeadb427648ec7e911613c8398f.1561032722.git.pmatilai@redhat.com>
+From: Panu Matilainen <pmatilai@redhat.com>
+Date: Thu, 20 Jun 2019 15:07:12 +0300
+Subject: [PATCH] Fix excessive use of thread local storage (RhBug:1722181),
+ part II
+
+This essentially reverts commit ff43d03d1f9686c9ffa9232a64e253783309feb5
+which made these all thread local. It might not be quite right, but then
+using TLS is not sensible either - threads have their own signal *mask*,
+but disposition is global, and most of what we do here is global anyway.
+In addition, the signal queue is only enabled in places where threads
+are not used (or would not be safe anyhow) so reverting for now seems
+the lesser evil.
+---
+ rpmio/rpmsq.c | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/rpmio/rpmsq.c b/rpmio/rpmsq.c
+index d157514e9..249a204b3 100644
+--- a/rpmio/rpmsq.c
++++ b/rpmio/rpmsq.c
+@@ -16,9 +16,9 @@
+
+ #include "debug.h"
+
+-static __thread int disableInterruptSafety;
+-static __thread sigset_t rpmsqCaught;
+-static __thread sigset_t rpmsqActive;
++static int disableInterruptSafety;
++static sigset_t rpmsqCaught;
++static sigset_t rpmsqActive;
+
+ typedef struct rpmsig_s * rpmsig;
+
+@@ -171,8 +171,8 @@ int rpmsqPoll(void)
+
+ int rpmsqBlock(int op)
+ {
+- static __thread sigset_t oldMask;
+- static __thread int blocked = 0;
++ static sigset_t oldMask;
++ static int blocked = 0;
+ sigset_t newMask;
+ int ret = 0;
+
+--
+2.21.0
+
diff --git a/rpm.spec b/rpm.spec
index 4298587..64b0e84 100644
--- a/rpm.spec
+++ b/rpm.spec
@@ -21,7 +21,7 @@
%global rpmver 4.14.90
%global snapver git14653
-%global rel 17
+%global rel 18
%global srcver %{version}%{?snapver:-%{snapver}}
%global srcdir %{?snapver:testing}%{!?snapver:%{name}-%(echo %{version} | cut -d'.' -f1-2).x}
@@ -58,6 +58,7 @@ Patch101: 0001-build-Limit-copying-changelog-one-at-a-time.patch
Patch102: 0001-Don-t-fail-build-trying-to-kill-a-non-existent-proce.patch
# https://github.com/rpm-software-management/rpm/pull/759
Patch103: 0001-Don-t-hog-thread-local-storage-it-s-a-scarce-resourc.patch
+Patch104: 0001-Fix-excessive-use-of-thread-local-storage-RhBug-1722.patch
# These are not yet upstream
Patch906: rpm-4.7.1-geode-i686.patch
@@ -544,6 +545,9 @@ make check || (cat tests/rpmtests.log; exit 0)
%doc doc/librpm/html/*
%changelog
+* Thu Jun 20 2019 Panu Matilainen <pmatilai@redhat.com> - 4.14.90-0.git14653.18
+- Fix excessive TLS use, part II (#1722181)
+
* Thu Jun 20 2019 Panu Matilainen <pmatilai@redhat.com> - 4.14.90-0.git14653.17
- Fix excessive TLS use (#1722181)
reply other threads:[~2026-11-23 9:32 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=179542637080.1.459256694194465786.rpms-rpm-70d62ac48f69@fedoraproject.org \
--to=pmatilai@redhat.com \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox