[media] videobuf2-core: take mmap_sem before calling __qbuf_userptr
(Changes since v2: dropped local variable as suggested by Laurent)
Commit f035eb4e97
(videobuf2: fix lockdep warning)
unfortunately removed the mmap_sem lock that is needed around the call to
__qbuf_userptr. Amazingly nobody noticed this (especially me as the author)
until Jan Kara pointed this out to me.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reported-by: Jan Kara <jack@suse.cz>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
This commit is contained in:
parent
825fd08dbb
commit
12561ad622
1 changed files with 2 additions and 0 deletions
|
@ -1627,7 +1627,9 @@ static int __buf_prepare(struct vb2_buffer *vb, const struct v4l2_buffer *b)
|
|||
ret = __qbuf_mmap(vb, b);
|
||||
break;
|
||||
case V4L2_MEMORY_USERPTR:
|
||||
down_read(¤t->mm->mmap_sem);
|
||||
ret = __qbuf_userptr(vb, b);
|
||||
up_read(¤t->mm->mmap_sem);
|
||||
break;
|
||||
case V4L2_MEMORY_DMABUF:
|
||||
ret = __qbuf_dmabuf(vb, b);
|
||||
|
|
Loading…
Reference in a new issue