linux-stable/tools/testing
Athira Rajeev 280f721edc testing/selftests/mqueue: Fix mq_perf_tests to free the allocated cpu set
[ Upstream commit ce64763c63 ]

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 issue by adding CPU_FREE in the "shutdown" function which
is called in most of the error/exit path for the cleanup. There are
few error paths which exit without using shutdown. Add a common goto
error path with CPU_FREE for these cases.

Fixes: 7820b0715b ("tools/selftests: add mq_perf_tests")
Signed-off-by: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-04-20 09:23:17 +02:00
..
fault-injection
ktest tweewide: Fix most Shebang lines 2021-05-22 11:40:55 +02:00
kunit tweewide: Fix most Shebang lines 2021-05-22 11:40:55 +02:00
nvdimm device-dax: add dis-contiguous resource support 2020-10-13 18:38:28 -07:00
radix-tree idr test suite: Create anchor before launching throbber 2021-04-16 11:43:21 +02:00
scatterlist tools/testing/scatterlist: Fix test to compile and run 2020-11-17 20:02:20 -04:00
selftests testing/selftests/mqueue: Fix mq_perf_tests to free the allocated cpu set 2022-04-20 09:23:17 +02:00
vsock