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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tencent_F566A4499E755FC452693B7DA93F0BEE2808@qq.com>
Date: Tue, 16 Dec 2025 16:38:06 +0800
From: Licay <licayy@...mail.com>
To: ywen.chen@...mail.com,
	akpm@...ux-foundation.org
Cc: andrealmeid@...lia.com,
	bigeasy@...utronix.de,
	colin.i.king@...il.com,
	dave@...olabs.net,
	dvhart@...radead.org,
	justinstitt@...gle.com,
	kernel-team@...roid.com,
	linux-kernel@...r.kernel.org,
	linux-kselftest@...r.kernel.org,
	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,
	Licay <licayy@...mail.com>
Subject: [PATCH v2 1/5] 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>

Reviewed-by: Licay <licayy@...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