diff options
author | Joe Thornber <[email protected]> | 2014-06-27 15:29:04 -0400 |
---|---|---|
committer | Mike Snitzer <[email protected]> | 2014-07-10 16:44:14 -0400 |
commit | 10f1d5d111e8aed46a0f1179faf9a3cf422f689e (patch) | |
tree | 5f91052d29b60c0959ea135708f2791d6fda6639 /tools/perf/util/scripting-engines/trace-event-python.c | |
parent | bf14299f1ce96c9d632533c4557303f8a74afc9e (diff) |
dm io: fix a race condition in the wake up code for sync_io
There's a race condition between the atomic_dec_and_test(&io->count)
in dec_count() and the waking of the sync_io() thread. If the thread
is spuriously woken immediately after the decrement it may exit,
making the on stack io struct invalid, yet the dec_count could still
be using it.
Fix this race by using a completion in sync_io() and dec_count().
Reported-by: Minfei Huang <[email protected]>
Signed-off-by: Joe Thornber <[email protected]>
Signed-off-by: Mike Snitzer <[email protected]>
Acked-by: Mikulas Patocka <[email protected]>
Cc: [email protected]
Diffstat (limited to 'tools/perf/util/scripting-engines/trace-event-python.c')
0 files changed, 0 insertions, 0 deletions