Re: [PATCH v4 1/2] media: v4l2-subdev: Verify arguments of v4l2_subdev_call()

2019-05-14 Thread Sakari Ailus
On Sat, May 11, 2019 at 12:10:30PM +0200, Janusz Krzysztofik wrote: > +static int check_get_fmt(struct v4l2_subdev *sd, > + struct v4l2_subdev_pad_config *cfg, > + struct v4l2_subdev_format *format) > +{ > + return check_format(sd, format) ? : > +

Re: [PATCH v4 1/2] media: v4l2-subdev: Verify arguments of v4l2_subdev_call()

2019-05-14 Thread Sakari Ailus
Hi Janusz, On Sat, May 11, 2019 at 12:10:30PM +0200, Janusz Krzysztofik wrote: > Correctness of format type (try or active) and pad number parameters > passed to subdevice operation callbacks is now verified only for IOCTL > calls. However, those callbacks are also used by drivers, e.g., V4L2 > h

[PATCH v4 1/2] media: v4l2-subdev: Verify arguments of v4l2_subdev_call()

2019-05-11 Thread Janusz Krzysztofik
Correctness of format type (try or active) and pad number parameters passed to subdevice operation callbacks is now verified only for IOCTL calls. However, those callbacks are also used by drivers, e.g., V4L2 host interfaces. Since both subdev_do_ioctl() and drivers are using v4l2_subdev_call() m