linux-stable/drivers/media
Daniel Mentz 9c7ba1d763 media: v4l2-compat-ioctl32: Fix timespec conversion
Certain syscalls like recvmmsg support 64 bit timespec values for the
X32 ABI. The helper function compat_put_timespec converts a timespec
value to a 32 bit or 64 bit value depending on what ABI is used. The
v4l2 compat layer, however, is not designed to support 64 bit timespec
values and always uses 32 bit values. Hence, compat_put_timespec must
not be used.

Without this patch, user space will be provided with bad timestamp
values from the VIDIOC_DQEVENT ioctl. Also, fields of the struct
v4l2_event32 that come immediately after timestamp get overwritten,
namely the field named id.

Fixes: 81993e81a9 ("compat: Get rid of (get|put)_compat_time(val|spec)")

Cc: stable@vger.kernel.org
Cc: H. Peter Anvin <hpa@linux.intel.com>
Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Cc: Tiffany Lin <tiffany.lin@mediatek.com>
Cc: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Cc: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Daniel Mentz <danielmentz@google.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-08-09 10:36:44 -04:00
..
cec media: cec-api: log the reason for the -EINVAL in cec_s_mode 2017-08-09 09:41:44 -04:00
common media: v4l2-tpg: fix the SMPTE-2084 transfer function 2017-08-08 07:05:09 -04:00
dvb-core media: dvb-core/demux.h: fix kernel-doc warning 2017-07-21 08:01:08 -04:00
dvb-frontends media: dvb-frontends: mb86a16: remove useless variables in signal_det() 2017-07-20 16:29:11 -04:00
firewire [media] firewire: don't break long lines 2016-10-21 10:06:00 -02:00
i2c media: adv7604: Prevent out of bounds access 2017-08-09 10:35:15 -04:00
mmc
pci media: solo6x10: export hardware GPIO pins 8:31 to gpiolib interface 2017-08-09 10:29:51 -04:00
platform media: DaVinci-VPBE: constify vpbe_dev_ops 2017-08-09 10:33:51 -04:00
radio media: radio: constify pci_device_id 2017-08-09 09:47:57 -04:00
rc media: lirc: LIRC_GET_REC_RESOLUTION should return microseconds 2017-07-26 05:46:42 -04:00
spi [media] gs1662: drop kfree for memory allocated with devm_kzalloc 2016-10-24 17:59:08 -02:00
tuners media: fc001[23]: make const gain table arrays static 2017-07-19 15:12:39 -04:00
usb media: cx231xx: drop return value of cx231xx_i2c_unregister 2017-08-09 10:17:00 -04:00
v4l2-core media: v4l2-compat-ioctl32: Fix timespec conversion 2017-08-09 10:36:44 -04:00
Kconfig media: cec-pin: add low-level pin hardware support 2017-07-18 12:57:18 -03:00
Makefile [media] cec: select CEC_CORE instead of depend on it 2017-06-04 15:23:33 -03:00
media-device.c media: drop use of MEDIA_API_VERSION 2017-08-08 06:03:15 -04:00
media-devnode.c media: utilize new cdev_device_add helper function 2017-03-21 06:44:33 +01:00
media-entity.c media: Make parameter of media_entity_remote_pad() const 2017-07-20 16:54:04 -04:00