aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/sched-migration.py
diff options
context:
space:
mode:
authorAlison Schofield <[email protected]>2017-01-21 19:28:52 -0800
committerJonathan Cameron <[email protected]>2017-01-22 13:21:41 +0000
commitd5d24bcc0a10a755ee77149e2f311c4ddafc19db (patch)
tree0f6a7162c45ffd3c6b6a758ffc567958b42762ae /tools/perf/scripts/python/sched-migration.py
parentdfebd8d81dc69afa9f20459ec9839f857f8c135f (diff)
iio: trigger: close race condition in acquiring trigger reference
In iio_trigger_write_current() we find the trigger we want while holding mutex on the list of triggers, but we don't actually do a get on it while holding mutex. We wait until further validations are completed and we're sure it's the one we want. Race condition is that it could be freed by the time we do the get. Solution is to grab the trigger (iio_trigger_get) as soon as we find it while holding mutex on the list of triggers. If later we decide it's not the right one, put it back. (iio_trigger_put). Signed-off-by: Alison Schofield <[email protected]> Suggested-by: Lars-Peter Clausen <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/sched-migration.py')
0 files changed, 0 insertions, 0 deletions