diff options
| author | OGAWA Hirofumi <[email protected]> | 2017-02-04 10:16:56 +0900 |
|---|---|---|
| committer | Samuel Ortiz <[email protected]> | 2017-04-01 23:04:30 +0200 |
| commit | 2497128133f8169b24b928852ba6eae34fc495e5 (patch) | |
| tree | 78d8aacc0bc93f1e3a426adcd8a470576c88801c /tools/perf/scripts/python/stackcollapse.py | |
| parent | 0ada076819529203e11fcd5d3d52a2c9ada21879 (diff) | |
nfc: Fix hangup of RC-S380* in port100_send_ack()
If port100_send_ack() was called twice or more, it has race to hangup.
port100_send_ack() port100_send_ack()
init_completion()
[...]
dev->cmd_cancel = true
/* this removes previous from completion */
init_completion()
[...]
dev->cmd_cancel = true
wait_for_completion()
/* never be waked up */
wait_for_completion()
Like above race, this code is not assuming port100_send_ack() is
called twice or more.
To fix, this checks dev->cmd_cancel to know if prior cancel is
in-flight or not. And never be remove prior task from completion by
using reinit_completion(), so this guarantees to be waked up properly
soon or later.
Signed-off-by: OGAWA Hirofumi <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions