Update to the latest upstream v6.14

Plus tip of origin/master @ b2b7934e

Signed-off-by: Vladis Dronov <vdronov@redhat.com>
This commit is contained in:
Vladis Dronov 2021-11-16 17:00:39 +01:00
parent 12e926e87d
commit 7eb83447ad
3 changed files with 5 additions and 39 deletions

View File

@ -1,36 +0,0 @@
From cb52458b360bfba060a13b1183d5d4bcc52b7d2e Mon Sep 17 00:00:00 2001
From: Neil Horman <nhorman@gmail.com>
Date: Fri, 3 Sep 2021 07:36:48 -0400
Subject: [PATCH] Lock the mutex prior to signaling a thread to exit
When we shutdown jitter we want to first lock the threads mutex, then
signal it to exit, otherwise we can get a race condition in which the
thread exits before we wait on the condition variable, and wind up
blocking forever
Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: Vladis Dronov <vdronov@redhat.com>
---
rngd_jitter.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/rngd_jitter.c b/rngd_jitter.c
index 2d04df4..47c9169 100644
--- rngd_jitter.c
+++ rngd_jitter.c
@@ -549,10 +549,10 @@ void close_jitter_entropy_source(struct rng *ent_src)
/* And wait for completion of each thread */
for (i=0; i < num_threads; i++) {
- /* Signal the threads to exit */
- pthread_kill(threads[i], SIGUSR1);
/* and wait for them to shutdown */
pthread_mutex_lock(&tdata[i].statemtx);
+ /* Signal the threads to exit */
+ pthread_kill(threads[i], SIGUSR1);
if (!tdata[i].done) {
message_entsrc(ent_src,LOG_DAEMON|LOG_DEBUG, "Checking on done for thread %d\n", i);
pthread_cond_wait(&tdata[i].statecond, &tdata[i].statemtx);
--
2.26.3

View File

@ -11,7 +11,7 @@
Summary: Random number generator related utilities
Name: rng-tools
Version: 6.14
Release: 1.git.56626083%{?dist}
Release: 2.git.b2b7934e%{?dist}
License: GPLv2+
URL: https://github.com/nhorman/rng-tools
Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
@ -39,7 +39,6 @@ Requires(postun): systemd
Patch0: 1-rt-revert-build-randstat.patch
Patch1: 2-rt-comment-out-have-aesni.patch
Patch2: 3-rt-lock-the-mutex.patch
%description
Hardware random number generation tools.
@ -88,6 +87,9 @@ install -D %{SOURCE2} -m0644 %{buildroot}%{_sysconfdir}/sysconfig/rngd
%config(noreplace) %attr(0644,root,root) %{_sysconfdir}/sysconfig/rngd
%changelog
* Tue Nov 16 2021 Vladis Dronov <vdronov@redhat.com> - 6.14-2.git.b2b7934e
- Update to the upstream v6.14 + tip of origin/master @ b2b7934e
* Mon Sep 20 2021 Vladis Dronov <vdronov@redhat.com> - 6.14-1.git.56626083
- Update to the upstream v6.14 + tip of origin/master @ 56626083
- Add an important 82f665c4 and a revert of 2ce93190

View File

@ -1 +1 @@
SHA512 (rng-tools-6.14.tar.gz) = 1f86a266c3d94c2ee170dddf79b9fb1625a4d1018efa0e4f3521d9fd5e9a0d7bb9338adf05b155de2f527ab4b2a274612a32d613a1cb6b93a28d9ddcd1dc18d2
SHA512 (rng-tools-6.14.tar.gz) = fce5c43d8a21a0d120a1f50b2b8c1efe7cbef02f7da863539749d51450992bb30c2cec96a4913ca20a608ce137a44e262471ac7f560eb8f3e9228a29b2d38fb1