diff options
| author | 2013-12-13 13:13:40 -0300 | |
|---|---|---|
| committer | 2014-01-07 07:08:47 -0200 | |
| commit | 63faabfd89f4db9862ae2a663193e511419c67eb (patch) | |
| tree | daf06328aa1e9e234cbb481e9a5f5c12a1818ac1 /scripts/diffconfig | |
| parent | [media] vb2: simplify qbuf/prepare_buf by removing callback (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 <hans.verkuil@cisco.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'scripts/diffconfig')
0 files changed, 0 insertions, 0 deletions
