aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/event_analyzing_sample.py
diff options
context:
space:
mode:
authorHans Verkuil <[email protected]>2013-12-13 13:13:40 -0300
committerMauro Carvalho Chehab <[email protected]>2014-01-07 07:08:47 -0200
commit63faabfd89f4db9862ae2a663193e511419c67eb (patch)
treedaf06328aa1e9e234cbb481e9a5f5c12a1818ac1 /tools/perf/scripts/python/event_analyzing_sample.py
parent4138111a27859dcc56a5592c804dd16bb12a23d1 (diff)
[media] vb2: fix race condition between REQBUFS and QBUF/PREPARE_BUF
When preparing a buffer the queue lock is released for a short while if the memory mode is USERPTR (see __buf_prepare for the details), which would allow a race with a REQBUFS which can free the buffers. Removing the buffers from underneath __buf_prepare is obviously a bad idea, so we check if any of the buffers is in the state PREPARING, and if so we just return -EAGAIN. If this happens, then the application does something really strange. The REQBUFS call can be retried safely, since this situation is transient. Signed-off-by: Hans Verkuil <[email protected]> Acked-by: Laurent Pinchart <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/event_analyzing_sample.py')
0 files changed, 0 insertions, 0 deletions