提交 d9762df4 编写于 作者: H Hans Verkuil 提交者: Mauro Carvalho Chehab

[media] Fix vivi regression

This patch fixes a regression introduced by commit
5126f259:

[media] v4l2-dev: add flag to have the core lock all file operations

I forgot to add the locks to the vivi read operation.

Regards,

	Hans
Signed-off-by: NHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 af03891f
......@@ -1149,10 +1149,14 @@ static ssize_t
vivi_read(struct file *file, char __user *data, size_t count, loff_t *ppos)
{
struct vivi_dev *dev = video_drvdata(file);
int err;
dprintk(dev, 1, "read called\n");
return vb2_read(&dev->vb_vidq, data, count, ppos,
mutex_lock(&dev->mutex);
err = vb2_read(&dev->vb_vidq, data, count, ppos,
file->f_flags & O_NONBLOCK);
mutex_unlock(&dev->mutex);
return err;
}
static unsigned int
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册