]> git.baikalelectronics.ru Git - kernel.git/commit
media: videobuf-dma-contig: Use size of buffer in mmap not vma size
authorAndrew F. Davis <afd@ti.com>
Fri, 29 Mar 2019 17:34:27 +0000 (13:34 -0400)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Wed, 29 May 2019 17:07:56 +0000 (13:07 -0400)
commit518789786ab4d647208abbcd424f715b52a913df
treeb560188e1daf6287030afb5b84008f7a464c3794
parent8b8798e4aefafe9087b96c47ffcde32a11301815
media: videobuf-dma-contig: Use size of buffer in mmap not vma size

The size of the vma can be larger than the size of the backing buffer.
Use the buffer size over vma size to prevent exposing extra memory
to userspace.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/v4l2-core/videobuf-dma-contig.c