Re: [PATCH] selftests: nci: Fix wrong size of status variables in nci_dev test

Jakub Kicinski <[email protected]> Tue, 21 Jul 2026 13:56:37 -0700
Newsgroups dev.linux.lists.oe-linux-nfc,org.kernel.vger.linux-kernel,org.kernel.vger.linux-kselftest,org.kernel.vger.netdev
Message-ID <[email protected]>
On Fri, 10 Jul 2026 13:23:00 +0200 Thomas Huth wrote:
> From: Thomas Huth <[email protected]>
> 
> pthread_join() stores the thread's return value (a "void *", i.e.
> 8 bytes on 64 bit computers) into the address of "status", but the
> "status" variable is declared as "int" with only 4 bytes. The extra
> four bytes clobber whatever is adjacent on the stack, which could
> silently corrupt other local variables. Use "intptr_t" to declare
> the "status" variables with the correct size.
> 
> Signed-off-by: Thomas Huth <[email protected]>

This should go via nfc, I just sent a patch to update MAINTAINERS.