projects
/
fio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6ac7a33
)
Fix potential crash in terminate_threads()
author
Jens Axboe
<jens.axboe@oracle.com>
Sat, 1 Mar 2008 14:25:24 +0000
(15:25 +0100)
committer
Jens Axboe
<jens.axboe@oracle.com>
Sat, 1 Mar 2008 14:25:24 +0000
(15:25 +0100)
td->io_ops can be NULL, if the thread is already gone. So copy the
pointer and check before dereferencing it.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
fio.c
patch
|
blob
|
blame
|
history
diff --git
a/fio.c
b/fio.c
index 1594bf64e5976c8a4d107aa2768d50bde0ca0404..d345064d392111e50accdb70db9fe2d43f45ab09 100644
(file)
--- a/
fio.c
+++ b/
fio.c
@@
-82,8
+82,12
@@
static void terminate_threads(int group_id)
*/
if (td->runstate < TD_RUNNING)
kill(td->pid, SIGQUIT);
- else if (td->io_ops->flags & FIO_SIGQUIT)
- kill(td->pid, SIGQUIT);
+ else {
+ struct ioengine_ops *ops = td->io_ops;
+
+ if (ops && (ops->flags & FIO_SIGQUIT))
+ kill(td->pid, SIGQUIT);
+ }
}
}
}