OSDN Git Service

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)
commit835706214875de6e6f8b9d01ceeed17b20622677
treeb560188e1daf6287030afb5b84008f7a464c3794
parent6211e44a4dfc2a12c5d40984ab876537bf0d0830
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