mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
[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 <[email protected]> Signed-off-by: Marek Szyprowski <[email protected]> Signed-off-by: Kyungmin Park <[email protected]> CC: Pawel Osciak <[email protected]> Acked-by: Laurent Pinchart <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
This commit is contained in:
parent
a6bd62be5a
commit
c1426bc727
2 changed files with 25 additions and 17 deletions
|
|
@ -276,6 +276,7 @@ struct vb2_queue {
|
|||
wait_queue_head_t done_wq;
|
||||
|
||||
void *alloc_ctx[VIDEO_MAX_PLANES];
|
||||
unsigned long plane_sizes[VIDEO_MAX_PLANES];
|
||||
|
||||
unsigned int streaming:1;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue