From 77c0782e9729cee9d1d67cd1343ed7c3f947a36a Mon Sep 17 00:00:00 2001 From: Seung-Woo Kim Date: Fri, 29 Nov 2013 04:50:29 -0300 Subject: [PATCH] [media] videobuf2: Add log for size checking error in __qbuf_dmabuf __qbuf_dmabuf checks whether size of provided dmabuf is large enough, and it returns error without any log. So this patch adds error log in the case. Signed-off-by: Seung-Woo Kim Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- drivers/media/v4l2-core/videobuf2-core.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/media/v4l2-core/videobuf2-core.c b/drivers/media/v4l2-core/videobuf2-core.c index e949a0e..144caf1 100644 --- a/drivers/media/v4l2-core/videobuf2-core.c +++ b/drivers/media/v4l2-core/videobuf2-core.c @@ -1116,6 +1116,8 @@ static int __qbuf_dmabuf(struct vb2_buffer *vb, const struct v4l2_buffer *b) if (planes[plane].length < planes[plane].data_offset + q->plane_sizes[plane]) { + dprintk(1, "qbuf: invalid dmabuf length for plane %d\n", + plane); ret = -EINVAL; goto err; } -- 2.7.4