linux/tools/testing/radix-tree
Colin Ian King 36a3b560c7 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:21:58 +02:00
..
generated
linux radix tree test suite: Fix compilation 2021-03-30 13:44:35 -04:00
.gitignore .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
benchmark.c
bitmap.c
idr-test.c idr test suite: Improve reporting from idr_find_test_1 2021-04-01 07:50:42 -04:00
iteration_check_2.c xarray: Fix early termination of xas_for_each_marked 2020-03-12 17:42:08 -04:00
iteration_check.c
linux.c
main.c xarray: Fix early termination of xas_for_each_marked 2020-03-12 17:42:08 -04:00
Makefile xarray: Fix early termination of xas_for_each_marked 2020-03-12 17:42:08 -04:00
multiorder.c radix tree test suite: Register the main thread with the RCU library 2021-04-01 07:41:30 -04:00
regression1.c radix tree test suite: fix incorrect allocation size for pthreads 2023-08-16 18:21:58 +02:00
regression2.c
regression3.c
regression4.c
regression.h
tag_check.c
test.c
test.h radix tree test suite: Fix compilation 2020-10-07 09:07:49 -04:00
xarray.c radix tree test suite: Register the main thread with the RCU library 2021-04-01 07:41:30 -04:00