]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
[media] videobuf2-core: Check user space planes array in dqbuf
authorSakari Ailus <sakari.ailus@linux.intel.com>
Sun, 3 Apr 2016 19:15:00 +0000 (16:15 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Wed, 13 Apr 2016 19:19:05 +0000 (16:19 -0300)
commite7e0c3e26587749b62d17b9dd0532874186c77f7
tree8af5ee3d02a1bfcd5f14d1d245636ffee6c716f2
parent405ddbfa68177b6169d09bc2308a39196a8eb64a
[media] videobuf2-core: Check user space planes array in dqbuf

The number of planes in videobuf2 is specific to a buffer. In order to
verify that the planes array provided by the user is long enough, a new
vb2_buf_op is required.

Call __verify_planes_array() when the dequeued buffer is known. Return an
error to the caller if there was one, otherwise remove the buffer from the
done list.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: stable@vger.kernel.org # for v4.4 and later
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/v4l2-core/videobuf2-core.c
include/media/videobuf2-core.h