linux-stable/tools/testing/radix-tree
Colin Ian King cac7ea57a0 radix tree test suite: fix incorrect allocation size for pthreads
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>
2023-08-04 13:03:40 -07:00
..
generated maple_tree: reorganize testing to restore module testing 2022-11-08 15:57:22 -08:00
linux maple_tree: add __init and __exit to test module 2023-06-09 16:25:31 -07:00
trace/events Maple Tree: add new data structure 2022-09-26 19:46:13 -07:00
.gitignore maple_tree: reorganize testing to restore module testing 2022-11-08 15:57:22 -08:00
Makefile radix-tree: move declarations to header 2023-06-12 11:31:50 -07:00
benchmark.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 288 2019-06-05 17:36:37 +02:00
bitmap.c xarray: Add XArray unconditional store operations 2018-10-21 10:45:57 -04:00
idr-test.c idr test suite: Improve reporting from idr_find_test_1 2021-04-01 07:50:42 -04:00
iteration_check.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 288 2019-06-05 17:36:37 +02:00
iteration_check_2.c xarray: Fix early termination of xas_for_each_marked 2020-03-12 17:42:08 -04:00
linux.c maple_tree: reorganize testing to restore module testing 2022-11-08 15:57:22 -08:00
main.c xarray: Fix early termination of xas_for_each_marked 2020-03-12 17:42:08 -04:00
maple.c maple_tree: fix node allocation testing on 32 bit 2023-07-17 12:53:22 -07:00
multiorder.c radix tree test suite: Register the main thread with the RCU library 2021-04-01 07:41:30 -04:00
regression.h radix tree: Don't return retry entries from lookup 2018-12-06 08:26:16 -05:00
regression1.c radix tree test suite: fix incorrect allocation size for pthreads 2023-08-04 13:03:40 -07:00
regression2.c radix tree test suite: Convert tag_tagged_items to XArray 2018-10-21 10:46:45 -04:00
regression3.c page cache: Convert find_get_pages_contig to XArray 2018-10-21 10:46:34 -04:00
regression4.c radix tree: Don't return retry entries from lookup 2018-12-06 08:26:16 -05:00
tag_check.c radix tree test suite: Convert tag_tagged_items to XArray 2018-10-21 10:46:45 -04:00
test.c radix tree tests: Convert item_delete_rcu to XArray 2018-10-21 10:46:48 -04:00
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