[media] v4l2-ioctl.c: handle PREPARE_BUF like QUERYBUF
authorHans Verkuil <hans.verkuil@cisco.com>
Wed, 19 Sep 2012 13:14:41 +0000 (10:14 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sat, 6 Oct 2012 01:24:11 +0000 (22:24 -0300)
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 <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/v4l2-core/v4l2-ioctl.c

index 9d3e46c446ad7cf502ca49fe6dcaa1d85ec09277..16205d9bddfcf3b04ae636e9db67645e90e6c520 100644 (file)
@@ -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: {