]> git.karo-electronics.de Git - linux-beck.git/commit
[media] v4l: mem2mem_testdev: Fix race conditions in driver
authorTomasz Moń <desowin@gmail.com>
Fri, 8 Jun 2012 07:47:34 +0000 (04:47 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Mon, 18 Jun 2012 22:45:59 +0000 (19:45 -0300)
commit9f4161a6b8796dc41dc3924d7869622f7975706a
treec34283e665e545ad976954cc34e39aef9eb2bde8
parent4e6bb2a5fb9265a222e3a86b215f4c5e6bcd61de
[media] v4l: mem2mem_testdev: Fix race conditions in driver

The mem2mem_testdev allows multiple instances to be opened in parallel.
Source and destination queue data are being shared between all
instances, which can lead to kernel oops due to race conditions (most
likely to happen inside device_run()).

Attached patch fixes mentioned problem by storing queue data per device
context.

Signed-off-by: Tomasz Moń <desowin@gmail.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/mem2mem_testdev.c