[media] media: vb2: add a check if queued userptr buffer is large enough
authorMarek Szyprowski <m.szyprowski@samsung.com>
Wed, 24 Aug 2011 09:36:26 +0000 (06:36 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Tue, 6 Sep 2011 18:03:49 +0000 (15:03 -0300)
commitc1426bc727b78808fb956f7402b689144c1506ee
treedd6f9667e01bfacd8f9674149c32ef774c2f0605
parenta6bd62be5a3e3a2eee9c0c1d7c04cb52cff3e073
[media] media: vb2: add a check if queued userptr buffer is large enough

Videobuf2 accepted any userptr buffer without verifying if its size is
large enough to store the video data from the driver. The driver reports
the minimal size of video data once in queue_setup and expects that
videobuf2 provides buffers that match these requirements. This patch
adds the required check.

Reported-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
CC: Pawel Osciak <pawel@osciak.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/videobuf2-core.c
include/media/videobuf2-core.h