Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Will Deacon <will@kernel.org>
To: Catalin Marinas <catalin.marinas@arm.com>,
	Thomas Huth <thuth@redhat.com>
Cc: mark.rutland@arm.com, kernel-team@android.com,
	Will Deacon <will@kernel.org>, Shuah Khan <shuah@kernel.org>,
	Vincenzo Frascino <vincenzo.frascino@arm.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] kselftest/arm64: Fix size of thread_data values for pthread_join()
Date: Fri, 11 Sep 2026 14:44:11 +0100	[thread overview]
Message-ID: <178913088317.2458205.17622266384307064211.b4-ty@kernel.org> (raw)
In-Reply-To: <20260909155707.161121-1-thuth@redhat.com>

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


      reply	other threads:[~2026-09-11 13:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-09 15:57 [PATCH] kselftest/arm64: Fix size of thread_data values for pthread_join() Thomas Huth
2026-09-11 13:44 ` Will Deacon [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178913088317.2458205.17622266384307064211.b4-ty@kernel.org \
    --to=will@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=kernel-team@android.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=shuah@kernel.org \
    --cc=thuth@redhat.com \
    --cc=vincenzo.frascino@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox