From: Dave Kleikamp <dave.kleikamp@oracle.com>
To: xfs@oss.sgi.com
Subject: [PATCH] xfstests: aio-stress is calling pthread_join incorrectly
Date: Tue, 18 Jun 2013 17:57:00 -0500 [thread overview]
Message-ID: <51C0E5BC.6060809@oracle.com> (raw)
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 <dave.kleikamp@oracle.com>
---
diff -up xfstests/ltp/aio-stress.c.orig xfstests/ltp/aio-stress.c
--- xfstests/ltp/aio-stress.c.orig 2013-06-03 11:53:49.000000000 -0700
+++ xfstests/ltp/aio-stress.c 2013-06-18 15:04:35.593859720 -0700
@@ -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, i
}
}
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);
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next reply other threads:[~2013-06-18 22:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-18 22:57 Dave Kleikamp [this message]
2013-06-18 23:13 ` [PATCH] xfstests: aio-stress is calling pthread_join incorrectly Dave Chinner
2013-06-26 16:22 ` Ben Myers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=51C0E5BC.6060809@oracle.com \
--to=dave.kleikamp@oracle.com \
--cc=xfs@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox