linux-stable/tools/testing/radix-tree
Colin Ian King 093d62a6c9 radix tree test suite: fix incorrect allocation size for pthreads
commit cac7ea57a0 upstream.

Currently the pthread allocation for each array item is based on the size
of a pthread_t pointer and should be the size of the pthread_t structure,
so the allocation is under-allocating the correct size.  Fix this by using
the size of each element in the pthreads array.

Static analysis cppcheck reported:
tools/testing/radix-tree/regression1.c:180:2: warning: Size of pointer
'threads' used instead of size of its data. [pointerSize]

Link: https://lkml.kernel.org/r/20230727160930.632674-1-colin.i.king@gmail.com
Fixes: 1366c37ed8 ("radix tree test harness")
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Cc: Konstantin Khlebnikov <koct9i@gmail.com>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-08-16 18:10:53 +02:00
..
generated radix tree test suite: Remove obsolete CONFIG 2017-02-13 16:09:43 -05:00
linux License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
.gitignore radix tree test suite: Add config option for map shift 2017-02-13 21:44:10 -05:00
benchmark.c radix tree test suite: Add performance test for radix_tree_join() 2017-03-07 13:18:21 -05:00
idr-test.c idr: Fix idr_get_next race with idr_remove 2019-11-24 08:22:46 +01:00
iteration_check.c radix tree test suite: Dial down verbosity with -v 2017-02-13 21:44:04 -05:00
linux.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
main.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
multiorder.c radix tree test suite: Fix split/join memory leaks 2017-02-13 21:44:08 -05:00
regression.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
regression1.c radix tree test suite: fix incorrect allocation size for pthreads 2023-08-16 18:10:53 +02:00
regression2.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
regression3.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
tag_check.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
test.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
test.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00