[PATCH] kselftest/arm64: Fix size of thread_data values for pthread_join()

Will Deacon will at kernel.org
Fri Sep 11 06:44:11 PDT 2026


On Wed, 09 Sep 2026 17:57:07 +0200, Thomas Huth wrote:
> pthread_join() stores the thread's return value (a "void *", i.e.
> 8 bytes on 64 bit computers) into the address that is passed as second
> parameter. However, the entries of thread_data are only normal "int"s,
> i.e. only 4 bytes. The additional 4 bytes of the return value clobber
> whatever is adjacent on the stack, i.e. other members of the thread_data
> array (which will be re-written in the next iteration of the for-loop,
> so that nobody noticed this problem), or another other local variable
> on the stack for the last iteration. Use "intptr_t" to declare the
> thread_data array entries with the correct size.
> 
> [...]

Applied to arm64 (for-next/fixes), thanks!

[1/1] kselftest/arm64: Fix size of thread_data values for pthread_join()
      https://git.kernel.org/arm64/c/3d1ba5cbfb62

Cheers,
-- 
Will

https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev



More information about the linux-arm-kernel mailing list