linux_dsm_epyc7002/drivers/media/v4l2-core
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
..
Kconfig Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds 2015-07-01 19:09:11 -07:00
Makefile [media] v4l2: move tracepoint generation into separate file 2015-08-11 10:26:33 -03:00
tuner-core.c [media] Drop owner assignment from i2c_driver 2015-08-11 13:01:57 -03:00
v4l2-async.c v4l: async: Add a pointer to of_node to struct v4l2_subdev, match it 2015-06-15 11:37:05 -07:00
v4l2-clk.c [media] V4L: add CCF support to the v4l2_clk API 2015-04-02 18:33:42 -03:00
v4l2-common.c [media] v4l2-common: move v4l2_ctrl_check to cx2341x 2014-11-25 08:25:36 -02:00
v4l2-compat-ioctl32.c [media] V4L2: fix VIDIOC_CREATE_BUFS 32-bit compatibility mode data copy-back 2014-11-03 15:11:59 -02:00
v4l2-ctrls.c [media] media/v4l2-ctrls: Code cleanout validate_new() 2015-07-06 08:25:52 -03:00
v4l2-dev.c [media] v4l2-dev: disable selection ioctls for non-video devices 2015-04-02 18:30:00 -03:00
v4l2-device.c [media] v4l2-core: remove the old .ioctl BKL replacement 2015-03-02 17:06:56 -03:00
v4l2-dv-timings.c [media] v4l2-dv-timings: print refresh rate with better precision 2015-07-06 08:25:53 -03:00
v4l2-event.c [media] v4l2-event: v4l2_event_queue: do nothing if vdev == NULL 2015-07-17 09:15:27 -03:00
v4l2-fh.c [media] media: v4l2-core: remove the use of V4L2_FL_USE_FH_PRIO flag 2014-07-04 16:14:22 -03:00
v4l2-flash-led-class.c media: Add registration helpers for V4L2 flash sub-devices 2015-06-22 13:53:16 -07:00
v4l2-ioctl.c [media] v4l2: move tracepoint generation into separate file 2015-08-11 10:26:33 -03:00
v4l2-mem2mem.c [media] v4l2-mem2mem: drop lock in v4l2_m2m_fop_mmap 2015-08-11 06:37:23 -03:00
v4l2-of.c [media] v4l: of: Correct pclk-sample for BT656 bus 2015-06-06 07:27:04 -03:00
v4l2-subdev.c [media] Add helper function for subdev event notifications 2015-07-17 09:45:50 -03:00
v4l2-trace.c [media] v4l2: move tracepoint generation into separate file 2015-08-11 10:26:33 -03:00
videobuf2-core.c [media] vb2: Push mmap_sem down to memops 2015-08-16 13:01:10 -03:00
videobuf2-dma-contig.c [media] vb2: Push mmap_sem down to memops 2015-08-16 13:01:10 -03:00
videobuf2-dma-sg.c [media] vb2: Push mmap_sem down to memops 2015-08-16 13:01:10 -03:00
videobuf2-dvb.c [media] vb2: Add videobuf2-dvb support 2014-04-16 18:59:29 -03:00
videobuf2-memops.c Revert "[media] v4l: vb2-memops: use vma slab when vma allocation" 2015-04-08 13:17:09 -03:00
videobuf2-vmalloc.c [media] vb2: Push mmap_sem down to memops 2015-08-16 13:01:10 -03:00
videobuf-core.c [media] videobuf: fix sparse warnings 2014-11-05 09:07:58 -02:00
videobuf-dma-contig.c [media] videobuf-dma-contig: set vm_pgoff to be zero to pass the sanity check in vm_iomap_memory() 2014-10-24 09:32:41 -02:00
videobuf-dma-sg.c [media] videobuf: make unused exported functions static 2015-01-27 10:01:33 -02:00
videobuf-dvb.c
videobuf-vmalloc.c [media] Revert "[media] videobuf_vm_{open,close} race fixes" 2014-02-04 06:29:46 -02:00