Possible issue in videobuf2 with buffer length check at QBUF time

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Marek and Pawel,

While reviewing an OMAP3 ISP patch, I noticed that videobuf2 doesn't verify 
the buffer length field value when a new USERPTR buffer is queued.

The length given by userspace is copied to the internal buffer length field. 
It seems to be up to drivers to verify that the value is equal to or higher 
than the minimum required to store the image, but that's not clearly 
documented. Should the buf_init operation be made mandatory for drivers that 
support USERPTR, and documented as required to implement a length check ?

Alternatively the check could be performed in videobuf2-core, which would 
probably make sense as the check is required. videobuf2 doesn't store the 
minimum size for USERPTR buffers though (but that can of course be changed).

-- 
Regards,

Laurent Pinchart
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux