]> git.karo-electronics.de Git - linux-beck.git/commit
[media] videobuf_vm_{open,close} race fixes
authorAl Viro <viro@ZenIV.linux.org.uk>
Thu, 9 May 2013 18:03:33 +0000 (15:03 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Tue, 21 May 2013 11:56:56 +0000 (08:56 -0300)
commita242f426108c284049a69710f871cc9f11b13e61
tree0cddab2680085f478cf5c5c5b168143de90e8b30
parent0735647c29bca5f33f38fcf457b3b0e9e5912f51
[media] videobuf_vm_{open,close} race fixes

just use videobuf_queue_lock(map->q) to protect map->count; vm_area_operations
->open() and ->close() are called just under vma->vm_mm->mmap_sem, which
doesn't help the drivers at all, since clonal VMAs are normally in different
address spaces...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/v4l2-core/videobuf-dma-contig.c
drivers/media/v4l2-core/videobuf-dma-sg.c
drivers/media/v4l2-core/videobuf-vmalloc.c