[media] v4l2-ioctl: clear the reserved field of v4l2_create_buffers
authorHans Verkuil <hans.verkuil@cisco.com>
Fri, 5 Jun 2015 08:11:14 +0000 (05:11 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Sat, 6 Jun 2015 10:35:14 +0000 (07:35 -0300)
This field was never cleared by the kernel making future extensions
hard to implement. Clear it now.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/v4l2-core/v4l2-ioctl.c

index 691295984225cae6b4a500f5bbcfcc20490e126c..bbeb9ffd5e92c2101bde5e9a7f65ed33a037180b 100644 (file)
@@ -1805,6 +1805,8 @@ static int v4l_create_bufs(const struct v4l2_ioctl_ops *ops,
        if (ret)
                return ret;
 
+       CLEAR_AFTER_FIELD(create, format);
+
        v4l_sanitize_format(&create->format);
 
        ret = ops->vidioc_create_bufs(file, fh, create);