Ubuntu-focal-kernel/tools/testing/radix-tree
Colin Ian King 1896b0fa6a radix tree test suite: fix incorrect allocation size for pthreads
BugLink: https://bugs.launchpad.net/bugs/2039291

commit cac7ea57a06016e4914848b707477fb07ee4ae1c 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>
Signed-off-by: Manuel Diewald <manuel.diewald@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
2023-10-30 11:41:52 +01:00
..
generated
linux
.gitignore
Makefile
benchmark.c
bitmap.c
idr-test.c idr test suite: Create anchor before launching throbber 2021-05-04 16:11:21 +02:00
iteration_check.c
iteration_check_2.c
linux.c
main.c
multiorder.c
regression.h
regression1.c radix tree test suite: fix incorrect allocation size for pthreads 2023-10-30 11:41:52 +01:00
regression2.c
regression3.c
regression4.c
tag_check.c
test.c
test.h
xarray.c