linux_dsm_epyc7002/drivers/media/usb/uvc
Laurent Pinchart c601f53f8f [media] v4l: uvcvideo: Fix buffer completion size check
Commit e93e7fd9f5 ("v4l2: uvcvideo: Allow
using larger buffers") reworked the buffer size sanity check at buffer
completion time to use the frame size instead of the allocated buffer
size. However, it introduced two bugs in doing so:

- it assigned the allocated buffer size to the frame_size field, instead
  of assigning the correct frame size

- it performed the assignment in the S_FMT handler, resulting in the
  frame_size field being uninitialized if the userspace application
  doesn't call S_FMT.

Fix both issues by removing the frame_size field and validating the
buffer size against the UVC video control dwMaxFrameSize.

Fixes: e93e7fd9f5 ("v4l2: uvcvideo: Allow using larger buffers")

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-10-21 08:53:27 -02:00
..
Kconfig [media] uvc: Depend on VIDEO_V4L2 2013-06-24 22:54:40 -03:00
Makefile [media] rename most media/video usb drivers to media/usb 2012-08-15 16:25:07 -03:00
uvc_ctrl.c [media] uvcvideo: Work around buggy Logitech C920 firmware 2014-09-21 20:25:54 -03:00
uvc_debugfs.c [media] rename most media/video usb drivers to media/usb 2012-08-15 16:25:07 -03:00
uvc_driver.c [media] media: usb: uvc: add a quirk for Dell XPS M1330 webcam 2014-09-21 20:26:25 -03:00
uvc_entity.c [media] uvcvideo: Mark first output terminal as default video node 2012-11-28 10:30:00 -02:00
uvc_isight.c [media] rename most media/video usb drivers to media/usb 2012-08-15 16:25:07 -03:00
uvc_queue.c [media] vb2: call buf_finish from __queue_cancel 2014-03-11 06:56:39 -03:00
uvc_status.c [media] uvcvideo: Fix open/close race condition 2013-06-08 19:51:16 -03:00
uvc_v4l2.c [media] v4l: uvcvideo: Fix buffer completion size check 2014-10-21 08:53:27 -02:00
uvc_video.c [media] v4l: uvcvideo: Fix buffer completion size check 2014-10-21 08:53:27 -02:00
uvcvideo.h [media] v4l: uvcvideo: Fix buffer completion size check 2014-10-21 08:53:27 -02:00