linux/drivers/media
Hans Verkuil cca36e2eec [media] Revert "[media] videobuf_vm_{open,close} race fixes"
This reverts commit a242f42610.

That commit actually caused deadlocks, rather then fixing them.

If ext_lock is set to NULL (otherwise videobuf_queue_lock doesn't do
anything), then you get this deadlock:

The driver's mmap function calls videobuf_mmap_mapper which calls
videobuf_queue_lock on q. videobuf_mmap_mapper calls  __videobuf_mmap_mapper,
__videobuf_mmap_mapper calls videobuf_vm_open and videobuf_vm_open
calls videobuf_queue_lock on q (introduced by above patch): deadlocked.

This affects drivers using dma-contig and dma-vmalloc. Only dma-sg is
not affected since it doesn't call videobuf_vm_open from __videobuf_mmap_mapper.

Most drivers these days have a non-NULL ext_lock. Those that still use
NULL there are all fairly obscure drivers, which is why this hasn't been
seen earlier.

Since everything worked perfectly fine for many years I prefer to just
revert this patch rather than trying to fix it. videobuf is quite fragile
and I rather not touch it too much. Work is (slowly) progressing to move
everything over to vb2 or at the very least use non-NULL ext_lock in
videobuf.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: <stable@vger.kernel.org>      # for v3.11 and up
Cc: Al Viro <viro@ZenIV.linux.org.uk>
Reported-by: Pete Eberlein <pete@sensoray.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-02-04 06:29:46 -02:00
..
common [media] media_tree: Fix spelling errors 2013-12-09 14:50:50 -02:00
dvb-core Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media 2014-01-31 09:31:14 -08:00
dvb-frontends [media] drxk: remove the option to load firmware asynchronously 2014-01-14 14:40:10 -02:00
firewire firewire: introduce fw_driver.probe and .remove methods 2013-06-09 18:15:00 +02:00
i2c [media] s5k5baf: allow to handle arbitrary long i2c sequences 2014-02-04 05:52:48 -02:00
mmc [media] siano: get rid of CammelCase from smscoreapi.h 2013-03-21 10:03:16 -03:00
parport [media] bw-qcam: fix timestamp handling 2013-05-27 09:30:19 -03:00
pci [media] media: bt8xx: add missing put_device call 2014-02-04 06:27:38 -02:00
platform [media] exynos4-is: Compile in fimc-lite runtime PM callbacks conditionally 2014-02-04 05:59:22 -02:00
radio [media] radio-usb-si4713: fix sparse non static symbol warnings 2014-01-15 09:12:51 -02:00
rc [media] rc-core: reuse device numbers 2014-01-15 11:46:37 -02:00
tuners [media] tuner-xc2028: Don't read status if device is powered down 2014-01-10 06:05:13 -02:00
usb [media] em28xx-cards: properly initialize the device bitmap 2014-01-15 11:46:20 -02:00
v4l2-core [media] Revert "[media] videobuf_vm_{open,close} race fixes" 2014-02-04 06:29:46 -02:00
Kconfig [media] subdev autoselect only works if I2C and I2C_MUX is selected 2013-12-21 06:03:06 -02:00
Makefile [media] move i2c files into drivers/media/i2c 2012-09-06 18:42:54 -03:00
media-device.c [media] media: info leak in __media_device_enum_links() 2013-06-12 18:52:45 -03:00
media-devnode.c [media] media: Add 64--32 bit compat ioctl handler 2013-03-18 20:44:36 -03:00
media-entity.c [media] media: Check for active links on pads with MEDIA_PAD_FL_MUST_CONNECT flag 2013-12-04 15:03:45 -02:00