From 96b1a70226cd43f69c63a7ba2a769bece08cf64e Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Wed, 19 Sep 2012 10:14:41 -0300 Subject: [PATCH] [media] v4l2-ioctl.c: handle PREPARE_BUF like QUERYBUF The core code for PREPARE_BUF didn't take the multiplanar case into account, which might cause page faults. Handle PREPARE_BUF just like QUERYBUF and QBUF/DQBUF. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- drivers/media/v4l2-core/v4l2-ioctl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c index 9d3e46c446ad..16205d9bddfc 100644 --- a/drivers/media/v4l2-core/v4l2-ioctl.c +++ b/drivers/media/v4l2-core/v4l2-ioctl.c @@ -2188,6 +2188,7 @@ static int check_array_args(unsigned int cmd, void *parg, size_t *array_size, int ret = 0; switch (cmd) { + case VIDIOC_PREPARE_BUF: case VIDIOC_QUERYBUF: case VIDIOC_QBUF: case VIDIOC_DQBUF: { -- 2.30.2