WSL2-Linux-Kernel/drivers/media/platform/omap
Al Viro 55ee64b30a [media] omap_vout: find_vma() needs ->mmap_sem held
Walking rbtree while it's modified is a Bad Idea(tm); besides,
the result of find_vma() can be freed just as it's getting returned
to caller.  Fortunately, it's easy to fix - just take ->mmap_sem a bit
earlier (and don't bother with find_vma() at all if virtp >= PAGE_OFFSET -
in that case we don't even look at its result).

While we are at it, what prevents VIDIOC_PREPARE_BUF calling
v4l_prepare_buf() -> (e.g) vb2_ioctl_prepare_buf() -> vb2_prepare_buf() ->
__buf_prepare() -> __qbuf_userptr() -> vb2_vmalloc_get_userptr() -> find_vma(),
AFAICS without having taken ->mmap_sem anywhere in process?  The code flow
is bloody convoluted and depends on a bunch of things done by initialization,
so I certainly might've missed something...

Cc: stable@vger.kernel.org [2.6.35]
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Cc: Sakari Ailus <sakari.ailus@iki.fi>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Archit Taneja <archit@ti.com>
Cc: Prabhakar Lad <prabhakar.lad@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-06 11:01:06 -02:00
..
Kconfig [media] omap: Fix Kconfig dependencies on OMAP2 2012-12-27 14:48:26 -02:00
Makefile
omap_vout.c [media] omap_vout: find_vma() needs ->mmap_sem held 2013-01-06 11:01:06 -02:00
omap_vout_vrfb.c ARM: OMAP: Move plat-omap/dma-omap.h to include/linux/omap-dma.h 2012-11-30 08:41:50 -08:00
omap_vout_vrfb.h
omap_voutdef.h OMAP: move arch/arm/plat-omap/include/plat/vrfb.h 2012-10-17 12:11:12 +03:00
omap_voutlib.c [media] omap_vout: use omapdss's version instead of cpu_is_* 2012-11-29 19:09:16 +02:00
omap_voutlib.h [media] omap_vout: use omapdss's version instead of cpu_is_* 2012-11-29 19:09:16 +02:00