lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <tencent_348CCFBB269D37E7FD7D11741116B171CB0A@qq.com>
Date: Thu, 11 Dec 2025 16:38:13 +0800
From: Yuwen Chen <ywen.chen@...mail.com>
To: ywen.chen@...mail.com
Cc: akpm@...ux-foundation.org,
	andrealmeid@...lia.com,
	dave@...olabs.net,
	dbueso@...e.de,
	dvhart@...radead.org,
	edliaw@...gle.com,
	hpa@...ux.intel.com,
	justinstitt@...gle.com,
	kernel-team@...roid.com,
	linux-kernel@...r.kernel.org,
	linux-kselftest@...r.kernel.org,
	llvm@...ts.linux.dev,
	luto@....edu,
	mingo@...hat.com,
	morbo@...gle.com,
	nathan@...nel.org,
	ndesaulniers@...gle.com,
	peterz@...radead.org,
	shuah@...nel.org,
	tglx@...utronix.de,
	usama.anjum@...labora.com
Subject: [PATCH 1/3] selftests/futex: reduce array declarations in the requeue_single

In the requeue_single function, the variable "waits" only uses
one element. There is no need to use an array.

Signed-off-by: Yuwen Chen <ywen.chen@...mail.com>
---
 tools/testing/selftests/futex/functional/futex_requeue.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/testing/selftests/futex/functional/futex_requeue.c b/tools/testing/selftests/futex/functional/futex_requeue.c
index 69e2555b60399..1807465de2144 100644
--- a/tools/testing/selftests/futex/functional/futex_requeue.c
+++ b/tools/testing/selftests/futex/functional/futex_requeue.c
@@ -33,7 +33,7 @@ TEST(requeue_single)
 {
 	volatile futex_t _f1 = 0;
 	volatile futex_t f2 = 0;
-	pthread_t waiter[10];
+	pthread_t waiter;
 	int res;
 
 	f1 = &_f1;
@@ -41,7 +41,7 @@ TEST(requeue_single)
 	/*
 	 * Requeue a waiter from f1 to f2, and wake f2.
 	 */
-	if (pthread_create(&waiter[0], NULL, waiterfn, NULL))
+	if (pthread_create(&waiter, NULL, waiterfn, NULL))
 		ksft_exit_fail_msg("pthread_create failed\n");
 
 	usleep(WAKE_WAIT_US);
-- 
2.34.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ