alistair23-linux/drivers/media
Jan Kara 0f6e2825ce [media] vb2: Push mmap_sem down to memops
Currently vb2 core acquires mmap_sem just around call to
__qbuf_userptr(). However since commit f035eb4e97 (videobuf2: fix
lockdep warning) it isn't necessary to acquire it so early as we no
longer have to drop queue mutex before acquiring mmap_sem. So push
acquisition of mmap_sem down into .get_userptr memop so that the
semaphore is acquired for a shorter time and it is clearer what it is
needed for.

Note that we also need mmap_sem in .put_userptr memop since that ends up
calling vb2_put_vma() which calls vma->vm_ops->close() which should be
called with mmap_sem held. However we didn't hold mmap_sem in some code
paths anyway (e.g. when called via vb2_ioctl_reqbufs() ->
__vb2_queue_free() -> vb2_dma_sg_put_userptr()) and getting mmap_sem in
put_userptr() introduces a lock inversion with queue->mmap_lock in the
above mentioned call path.

Luckily this whole locking mess will get resolved once we convert
videobuf2 core to the new mm helper which avoids the need for mmap_sem
in .put_userptr memop altogether.

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-08-16 13:01:10 -03:00
..
common [media] saa7146: use swap() in sort_and_eliminate() 2015-07-06 08:25:49 -03:00
dvb-core [media] dvb_core: Replace memset with eth_zero_addr 2015-07-22 13:32:21 -03:00
dvb-frontends [media] tda10071: use div_s64() when dividing a s64 integer 2015-08-11 19:19:30 -03:00
firewire [media] dvb: Get rid of typedev usage for enums 2015-06-09 17:47:35 -03:00
i2c [media] sr030pc30: don't read a new pointer 2015-08-16 12:58:31 -03:00
mmc
pci [media] netup_unidvb: NetUP Universal DVB-S/S2/T/T2/C PCI-E card driver 2015-08-11 15:16:40 -03:00
platform [media] c8sectpfe: use a new Kconfig menu for DVB platform drivers 2015-08-11 19:28:23 -03:00
radio [media] radio: Drop owner assignment from i2c_driver 2015-08-11 13:01:08 -03:00
rc [media] rc-core: improve the lirc protocol reporting 2015-08-11 13:18:13 -03:00
tuners [media] tuners: Drop owner assignment from i2c_driver 2015-08-11 13:01:32 -03:00
usb [media] Technisat SkyStar USB HD,(DVB-S/S2) too much URBs for arm devices 2015-08-11 14:43:23 -03:00
v4l2-core [media] vb2: Push mmap_sem down to memops 2015-08-16 13:01:10 -03:00
Kconfig media updates for v4.2-rc1 2015-06-25 17:55:48 -07:00
Makefile
media-device.c
media-devnode.c
media-entity.c