Select Git revision
4201-HACK-media-vb2-don-t-validate-buffer-length.patch
Forked from
Reform / reform-system-image
637 commits behind the upstream repository.
minute authored
4201-HACK-media-vb2-don-t-validate-buffer-length.patch 1.05 KiB
From: Lucas Stach <l.stach@pengutronix.de>
Date: Thu, 21 Feb 2019 10:46:45 +0100
Subject: [PATCH] HACK: media: vb2: don't validate buffer length
In the dma-buf import case, gstreamer currently sets the queue buffer
size without knowing the real (padded) size of the buffers produced
by the exporter. As this needs some bigger changes to gstreamer to
fix properly, just skip the validation for now.
Not-signed-off-by: Lucas Stach <l.stach@pengutronix.de>
---
drivers/media/common/videobuf2/videobuf2-v4l2.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/media/common/videobuf2/videobuf2-v4l2.c b/drivers/media/common/videobuf2/videobuf2-v4l2.c
index 5a9ba3846f0a..d944f74f04b0 100644
--- a/drivers/media/common/videobuf2/videobuf2-v4l2.c
+++ b/drivers/media/common/videobuf2/videobuf2-v4l2.c
@@ -113,9 +113,6 @@ static int __verify_length(struct vb2_buffer *vb, const struct v4l2_buffer *b)
} else {
length = (b->memory == VB2_MEMORY_USERPTR)
? b->length : vb->planes[0].length;
-
- if (b->bytesused > length)
- return -EINVAL;
}
return 0;