[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220406175715.87937-1-atrajeev@linux.vnet.ibm.com>
Date: Wed, 6 Apr 2022 23:27:15 +0530
From: Athira Rajeev <atrajeev@...ux.vnet.ibm.com>
To: shuah@...nel.org, linux-kselftest@...r.kernel.org,
disgoel@...ux.vnet.ibm.com
Cc: acme@...nel.org, jolsa@...nel.org, mpe@...erman.id.au,
linux-perf-users@...r.kernel.org, linuxppc-dev@...ts.ozlabs.org,
linux-kernel@...r.kernel.org, maddy@...ux.vnet.ibm.com,
kjain@...ux.ibm.com, srikar@...ux.vnet.ibm.com
Subject: [PATCH] testing/selftests/mqueue: Fix mq_perf_tests to free the allocated cpu set
The selftest "mqueue/mq_perf_tests.c" use CPU_ALLOC to allocate
CPU set. This cpu set is used further in pthread_attr_setaffinity_np
and by pthread_create in the code. But in current code, allocated
cpu set is not freed. Fix this by adding CPU_FREE after its usage
is done.
Signed-off-by: Athira Rajeev <atrajeev@...ux.vnet.ibm.com>
---
tools/testing/selftests/mqueue/mq_perf_tests.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/testing/selftests/mqueue/mq_perf_tests.c b/tools/testing/selftests/mqueue/mq_perf_tests.c
index b019e0b8221c..17c41f216bef 100644
--- a/tools/testing/selftests/mqueue/mq_perf_tests.c
+++ b/tools/testing/selftests/mqueue/mq_perf_tests.c
@@ -732,6 +732,7 @@ int main(int argc, char *argv[])
pthread_attr_destroy(&thread_attr);
}
+ CPU_FREE(cpu_set);
if (!continuous_mode) {
pthread_join(cpu_threads[0], &retval);
shutdown((long)retval, "perf_test_thread()", __LINE__);
--
2.35.1
Powered by blists - more mailing lists