From: Dave Kleikamp Date: Tue, 18 Jun 2013 22:57:00 +0000 (-0500) Subject: xfstests: aio-stress is calling pthread_join incorrectly X-Git-Tag: v2022.05.01~3410 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=a72607fadab2773135d0f484e1a82193e9940dfb;p=xfstests-dev.git xfstests: aio-stress is calling pthread_join incorrectly The retval parameter to pthread_join() is a pointer to a pointer. aio-stress is passing in a pointer to an int. This can result in a bus error on sparc64 when the pointer is not aligned on a 64-bit boundary. Since the return value is not used, it is simplest to pass a NULL pointer instead. This has been fixed in the LTP source: https://github.com/linux-test-project/ltp/commit/981d33aad3b33c4625b88990fbf2fad5470d47e0 Signed-off-by: Dave Kleikamp Reviewed-by: Dave Chinner Signed-off-by: Ben Myers --- diff --git a/ltp/aio-stress.c b/ltp/aio-stress.c index 57a21583..ebff1bd4 100644 --- a/ltp/aio-stress.c +++ b/ltp/aio-stress.c @@ -1210,7 +1210,6 @@ typedef void * (*start_routine)(void *); int run_workers(struct thread_info *t, int num_threads) { int ret; - int thread_ret; int i; for(i = 0 ; i < num_threads ; i++) { @@ -1221,7 +1220,7 @@ int run_workers(struct thread_info *t, int num_threads) } } for(i = 0 ; i < num_threads ; i++) { - ret = pthread_join(t[i].tid, (void *)&thread_ret); + ret = pthread_join(t[i].tid, NULL); if (ret) { perror("pthread_join"); exit(1);