mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
Fix a deadlock in the bttv driver
vidiocgmbuf() does this:
mutex_lock(&fh->cap.vb_lock);
retval = videobuf_mmap_setup(&fh->cap, gbuffers, gbufsize,
V4L2_MEMORY_MMAP);
and videobuf_mmap_setup() then just does
mutex_lock(&q->vb_lock);
ret = __videobuf_mmap_setup(q, bcount, bsize, memory);
mutex_unlock(&q->vb_lock);
which is an obvious double-take deadlock.
This patch fixes this by having vidiocgmbuf() just call the
__videobuf_mmap_setup function instead.
Acked-by: Mauro Carvalho Chehab <[email protected]>
Reported-by: Koos Vriezen <[email protected]>
Signed-off-by: Arjan van de Ven <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
babd90b274
commit
81b2dbcad8
3 changed files with 6 additions and 2 deletions
|
|
@ -237,6 +237,9 @@ unsigned int videobuf_poll_stream(struct file *file,
|
|||
int videobuf_mmap_setup(struct videobuf_queue *q,
|
||||
unsigned int bcount, unsigned int bsize,
|
||||
enum v4l2_memory memory);
|
||||
int __videobuf_mmap_setup(struct videobuf_queue *q,
|
||||
unsigned int bcount, unsigned int bsize,
|
||||
enum v4l2_memory memory);
|
||||
int videobuf_mmap_free(struct videobuf_queue *q);
|
||||
int videobuf_mmap_mapper(struct videobuf_queue *q,
|
||||
struct vm_area_struct *vma);
|
||||
|
|
|
|||
Loading…
Reference in a new issue