From 854dd6acf1a88f82ba45056e8f81986a73870ba4 Mon Sep 17 00:00:00 2001 From: Linux_zhang Date: Mon, 20 Oct 2025 15:34:34 +0800 Subject: [PATCH] backport patch from upstream (cherry picked from commit 7cb0e3d6dad401b33df218624808ef78180f9c42) --- audit.spec | 6 ++- ...elease-queue-mutexes-during-teardown.patch | 43 +++++++++++++++++++ 2 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 backport-Release-queue-mutexes-during-teardown.patch diff --git a/audit.spec b/audit.spec index 1cc65c0..0055f1d 100644 --- a/audit.spec +++ b/audit.spec @@ -2,7 +2,7 @@ Summary: User space tools for kernel auditing Name: audit Epoch: 1 Version: 3.0.1 -Release: 20 +Release: 21 License: GPLv2+ and LGPLv2+ URL: https://people.redhat.com/sgrubb/audit/ Source0: https://people.redhat.com/sgrubb/audit/%{name}-%{version}.tar.gz @@ -92,6 +92,7 @@ Patch80: backport-Terminate-a-couple-strncpy.patch Patch81: backport-Modify-ausearch-checkpoint-code-to-address-audit-use.patch Patch82: backport-Update-_get_hostname-436.patch Patch83: backport-If-we-are-checkpointing-decide-if-we-output-this-eve.patch +Patch84: backport-Release-queue-mutexes-during-teardown.patch BuildRequires: gcc swig libtool systemd kernel-headers >= 2.6.29 BuildRequires: openldap-devel krb5-devel libcap-ng-devel @@ -427,6 +428,9 @@ fi %attr(644,root,root) %{_mandir}/man8/*.8.gz %changelog +* Mon Oct 20 2025 Linux_zhang - 1:3.0.1-21 +- backport patch from upstream + * Wed Aug 13 2025 Linux_zhang - 1:3.0.1-20 - backport patches from upstream diff --git a/backport-Release-queue-mutexes-during-teardown.patch b/backport-Release-queue-mutexes-during-teardown.patch new file mode 100644 index 0000000..081b27f --- /dev/null +++ b/backport-Release-queue-mutexes-during-teardown.patch @@ -0,0 +1,43 @@ +From bbac8f8bb4dd2fe43388c08c593edac1de712e74 Mon Sep 17 00:00:00 2001 +From: Cropi +Date: Mon, 23 Jun 2025 12:38:15 +0200 +Subject: [PATCH] Release queue mutexes during teardown +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Destroy the queue mutex and condition variable in the zos‑remote cleanup +and destroy the queue mutex in the main audisp queue destructor after +freeing entries. + +--- + audisp/plugins/zos-remote/zos-remote-queue.c | 2 ++ + audisp/queue.c | 1 + + 2 files changed, 3 insertions(+) + +diff --git a/audisp/plugins/zos-remote/zos-remote-queue.c b/audisp/plugins/zos-remote/zos-remote-queue.c +index 67397f3..eb2c0da 100644 +--- a/audisp/plugins/zos-remote/zos-remote-queue.c ++++ b/audisp/plugins/zos-remote/zos-remote-queue.c +@@ -152,5 +152,7 @@ void destroy_queue(void) + } + + free(q); ++ pthread_mutex_destroy(&queue_lock); ++ pthread_cond_destroy(&queue_nonempty); + } + +diff --git a/audisp/queue.c b/audisp/queue.c +index 92e6b21..8043e25 100644 +--- a/audisp/queue.c ++++ b/audisp/queue.c +@@ -261,5 +261,6 @@ void destroy_queue(void) + free((void *)q[i]); + + free(q); ++ pthread_mutex_destroy(&queue_lock); + } + +-- +2.43.0 + -- Gitee