All of lore.kernel.org
 help / color / mirror / Atom feed
From: Florian Bezdeka <florian.bezdeka@siemens.com>
To: xenomai@xenomai.org
Subject: [PATCH v3 1/5] smokey: posix_mutex: Fix mutex/smokey_barrier leak
Date: Fri, 30 Jul 2021 15:58:52 +0200	[thread overview]
Message-ID: <20210730135856.12958-2-florian.bezdeka@siemens.com> (raw)
In-Reply-To: <20210730135856.12958-1-florian.bezdeka@siemens.com>

The mutex of the smokey_barrier used inside protect_handover() was
never destroyed. This had side effects when trying to extend the test
suite with an additional function that had a mutex located on the same
address than the never cleaned up smokey_barrier lock.

Signed-off-by: Florian Bezdeka <florian.bezdeka@siemens.com>
---
 testsuite/smokey/posix-mutex/posix-mutex.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/testsuite/smokey/posix-mutex/posix-mutex.c b/testsuite/smokey/posix-mutex/posix-mutex.c
index 9a55d0973..e5793c42c 100644
--- a/testsuite/smokey/posix-mutex/posix-mutex.c
+++ b/testsuite/smokey/posix-mutex/posix-mutex.c
@@ -997,6 +997,8 @@ static int protect_handover(void)
 	if (!__T(ret, pthread_mutex_destroy(&mutex)))
 		return ret;
 
+	smokey_barrier_destroy(&barrier);
+
 	return 0;
 }
 
-- 
2.30.2



  reply	other threads:[~2021-07-30 13:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-30 13:58 [PATCH v3 0/5] y2038: Add mutex_timedlock64() support Florian Bezdeka
2021-07-30 13:58 ` Florian Bezdeka [this message]
2021-07-30 13:58 ` [PATCH v3 2/5] cobalt/posix/mutex: Harmonize pthread_mutex_timedlock() and sem_timedwait() Florian Bezdeka
2021-07-30 13:58 ` [PATCH v3 3/5] y2038: cobalt/posix/mutex: Adding mutex_timedlock64 Florian Bezdeka
2021-07-30 13:58 ` [PATCH v3 4/5] y2038: lib/cobalt/mutex: dispatch mutex_timedlock Florian Bezdeka
2021-07-30 13:58 ` [PATCH v3 5/5] testsuite/smokey/y2038: Adding test cases for mutex_timedlock64() Florian Bezdeka

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=20210730135856.12958-2-florian.bezdeka@siemens.com \
    --to=florian.bezdeka@siemens.com \
    --cc=xenomai@xenomai.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.