1
linux/drivers/media/video
Arnaud Patard 22c859faf5 V4L/DVB: Fix VIDIOC_QBUF compat ioctl32
When using VIDIOC_QBUF with memory type set to V4L2_MEMORY_MMAP, the
v4l2_buffer buffer gets unmodified on drivers like uvc (well, only
bytesused field is modified). Then some apps like gstreamer are reusing
the same buffer later to call munmap (eg passing the buffer "length"
field as 2nd parameter of munmap).

It's working fine on full 32bits but on 32bits systems with 64bit
kernel, the get_v4l2_buffer32() doesn't copy length/m.offset values and
then copy garbage to userspace in put_v4l2_buffer32().

This has for consequence things like that in the libv4l2 logs:

libv4l2: v4l2 unknown munmap 0x2e2b0000, -2145144908
libv4l2: v4l2 unknown munmap 0x2e530000, -2145144908

The buffer are not unmap'ed and then if the application close and open
again the device, it won't work and logs will show something like:

libv4l2: error setting pixformat: Device or resource busy

The easy solution is to read length and m.offset in get_v4l2_buffer32().

Signed-off-by: Arnaud Patard <apatard@mandriva.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:49 -03:00
..
au0828 V4L/DVB (13556): v4l: Remove unneeded video_device::minor assignments 2009-12-16 00:17:57 -02:00
bt8xx V4L/DVB (13680): ir: use unsigned long instead of enum 2010-02-26 15:10:24 -03:00
cpia2 V4L/DVB (13594): cpia2: use __stringify macro. 2009-12-16 00:18:31 -02:00
cx18 Fix the __init/__exit annotations 2010-02-26 15:10:48 -03:00
cx88 V4L/DVB (13680): ir: use unsigned long instead of enum 2010-02-26 15:10:24 -03:00
cx231xx V4L/DVB: cx231xx: cleanup dvb_attach() return value handling 2010-02-26 15:10:46 -03:00
cx23885 V4L/DVB: cx23885: Wrong command printed in cmd_to_str() 2010-02-26 15:10:48 -03:00
cx25840 V4L/DVB: cx25840, v4l2-subdev, ivtv, pvrusb2: Fix ivtv/cx25840 tinny audio 2010-02-26 15:10:41 -03:00
davinci V4L/DVB: vpfe-capture: converting dm644x ccdc driver to a platform driver 2010-02-26 15:10:45 -03:00
em28xx V4L/DVB (13961): em28xx-dvb: fix memleak in dvb_fini() 2010-02-26 15:10:34 -03:00
et61x251 V4L/DVB (14005): media/video Kconfig: Mark gspca superceeded drivers as deprecated 2010-02-26 15:10:41 -03:00
gspca V4L/DVB: gspca - sq905c: Fix a compilation warning 2010-02-26 15:10:48 -03:00
hdpvr V4L/DVB (13685): Correct code taking the size of a pointer 2009-12-16 09:27:55 -02:00
ivtv V4L/DVB: ivtv: Adjust msleep() delays used to prevent tinny audio and PCI bus hang 2010-02-26 15:10:41 -03:00
ovcamchip
pvrusb2 V4L/DVB: cx25840, v4l2-subdev, ivtv, pvrusb2: Fix ivtv/cx25840 tinny audio 2010-02-26 15:10:41 -03:00
pwc V4L/DVB: Video : pwc : Fix regression in pwc_set_shutter_speed caused by bad constant => sizeof conversion. 2010-02-19 03:19:02 -02:00
saa7134 V4L/DVB: Compro S350 GPIO change 2010-02-26 15:10:41 -03:00
saa7164 V4L/DVB (12930): Wrong variable tested 2010-02-26 15:10:34 -03:00
sn9c102 V4L/DVB (14005): media/video Kconfig: Mark gspca superceeded drivers as deprecated 2010-02-26 15:10:41 -03:00
usbvideo V4L/DVB (13556): v4l: Remove unneeded video_device::minor assignments 2009-12-16 00:17:57 -02:00
usbvision V4L/DVB (13954): Correct NULL test 2010-02-26 15:10:33 -03:00
uvc V4L/DVB (13830): uvcvideo: add another YUYV format GUID for iSight cameras 2010-02-26 15:10:25 -03:00
zc0301 V4L/DVB (14005): media/video Kconfig: Mark gspca superceeded drivers as deprecated 2010-02-26 15:10:41 -03:00
zoran V4L/DVB: zoran: remove variable shadowing 2010-02-26 15:10:49 -03:00
adv7170.c
adv7175.c
adv7180.c V4L/DVB (13176): adv7180: Support checking standard via interrupts 2009-12-05 18:40:43 -02:00
adv7343_regs.h V4L/DVB (11743): Analog Devices ADV7343 video encoder driver 2009-06-16 18:20:59 -03:00
adv7343.c V4L/DVB (12201): adv7343: remove unused #include <linux/version.h> 2009-09-19 00:18:07 -03:00
arv.c V4L/DVB (13556): v4l: Remove unneeded video_device::minor assignments 2009-12-16 00:17:57 -02:00
bt819.c V4L/DVB: bt819: cleanup v4l2_subdev_notify() parameters 2010-02-26 15:10:46 -03:00
bt856.c
bt866.c
btcx-risc.c
btcx-risc.h
bw-qcam.c V4L/DVB (12438): Read buffer overflow 2009-08-13 20:39:14 -03:00
bw-qcam.h
c-qcam.c V4L/DVB (13550): v4l: Use the new video_device_node_name function 2009-12-16 00:17:55 -02:00
cafe_ccic-regs.h
cafe_ccic.c V4L/DVB (13556): v4l: Remove unneeded video_device::minor assignments 2009-12-16 00:17:57 -02:00
cpia_pp.c
cpia_usb.c
cpia.c V4L/DVB (13590): cpia: convert it to use proc_fops 2009-12-16 00:18:23 -02:00
cpia.h
cs53l32a.c
cs5345.c
cs8420.h
cx2341x.c V4L/DVB (12104): ivtv/cx18: fix regression: class controls are no longer seen 2009-06-23 03:14:31 -03:00
dabusb.c V4L/DVB: dabusb: declare MODULE_FIRMWARE 2010-02-26 15:10:45 -03:00
dabusb.h
font.h
hexium_gemini.c V4L/DVB (13241): Cleanup redundant tests on unsigned 2009-12-05 18:41:04 -02:00
hexium_orion.c V4L/DVB (13241): Cleanup redundant tests on unsigned 2009-12-05 18:41:04 -02:00
ibmmpeg2.h
indycam.c
indycam.h
ir-kbd-i2c.c V4L/DVB (13680): ir: use unsigned long instead of enum 2010-02-26 15:10:24 -03:00
Kconfig V4L/DVB (14004): drivers/media/video/Kconfig: Turn deprecated drivers off by default 2010-02-26 15:10:40 -03:00
ks0127.c
ks0127.h
m52790.c
Makefile V4L/DVB (13670): soc-camera: Add mt9t112 camera driver 2009-12-16 09:27:41 -02:00
meye.c kfifo: fix warn_unused_result 2009-12-22 14:17:56 -08:00
meye.h kfifo: move struct kfifo in place 2009-12-22 14:17:55 -08:00
msp3400-driver.c
msp3400-driver.h
msp3400-kthreads.c
mt9m001.c V4L/DVB (13659): soc-camera: convert to the new mediabus API 2009-12-16 09:27:29 -02:00
mt9m111.c V4L/DVB (13659): soc-camera: convert to the new mediabus API 2009-12-16 09:27:29 -02:00
mt9t031.c V4L/DVB (13662): mt9t031: make the use of the soc-camera client API optional 2009-12-16 09:27:31 -02:00
mt9t112.c soc-camera: mt9t112: modify exiting conditions from standby mode 2010-02-19 03:19:01 -02:00
mt9v011.c V4L/DVB (12401): m9v011: add vflip/hflip controls to control mirror/upside down 2009-08-13 20:39:08 -03:00
mt9v011.h V4L/DVB (12340): mtv9v011: Add a missing chip version to the driver 2009-08-13 20:39:02 -03:00
mt9v022.c V4L/DVB (13659): soc-camera: convert to the new mediabus API 2009-12-16 09:27:29 -02:00
mx1_camera.c V4L/DVB mx1_camera: don't check platform_get_irq's return value against zero 2010-01-17 11:31:37 -02:00
mx3_camera.c V4L/DVB (13659): soc-camera: convert to the new mediabus API 2009-12-16 09:27:29 -02:00
mxb.c V4L/DVB (13241): Cleanup redundant tests on unsigned 2009-12-05 18:41:04 -02:00
mxb.h
omap24xxcam-dma.c
omap24xxcam.c V4L/DVB (13557): v4l: Remove unneeded video_device::minor usage in drivers 2009-12-16 00:17:58 -02:00
omap24xxcam.h
ov511.c V4L/DVB (13596): ov511.c typo: lock => unlock 2009-12-16 00:18:33 -02:00
ov511.h V4L/DVB (11966): ov511: Fix unit_video parameter behavior 2009-06-16 19:07:40 -03:00
ov772x.c V4L/DVB (13659): soc-camera: convert to the new mediabus API 2009-12-16 09:27:29 -02:00
ov7670.c
ov9640.c V4L/DVB (13659): soc-camera: convert to the new mediabus API 2009-12-16 09:27:29 -02:00
ov9640.h V4L/DVB (13040): V4L2: Add a v4l2-subdev (soc-camera) driver for OmniVision OV9640 sensor 2009-12-05 18:40:01 -02:00
pms.c V4L/DVB (13698): pms: replace asm/uaccess.h to linux/uaccess.h 2009-12-16 09:28:01 -02:00
pxa_camera.c V4L/DVB (13659): soc-camera: convert to the new mediabus API 2009-12-16 09:27:29 -02:00
rj54n1cb0c.c V4L/DVB (13951): rj54n1cb0: Storage class should be before const qualifier 2010-02-26 15:10:33 -03:00
s2255drv.c V4L/DVB (13556): v4l: Remove unneeded video_device::minor assignments 2009-12-16 00:17:57 -02:00
saa711x_regs.h
saa717x.c V4L/DVB (13396): correct initialization of audio_mode 2009-12-05 18:41:40 -02:00
saa5246a.c V4L/DVB (13556): v4l: Remove unneeded video_device::minor assignments 2009-12-16 00:17:57 -02:00
saa5249.c headers: smp_lock.h redux 2009-07-12 12:22:34 -07:00
saa6588.c V4L/DVB (12215): saa6588: conform to the final RDS spec. 2009-09-12 12:17:31 -03:00
saa7110.c V4L/DVB (13241): Cleanup redundant tests on unsigned 2009-12-05 18:41:04 -02:00
saa7115.c
saa7121.h
saa7127.c V4L/DVB (13913): saa7127: Add support for generating SECAM output for the SAA712[89] chips 2010-02-26 15:10:30 -03:00
saa7146.h
saa7146reg.h
saa7185.c
saa7191.c
saa7191.h
se401.c V4L/DVB (13550): v4l: Use the new video_device_node_name function 2009-12-16 00:17:55 -02:00
se401.h V4L/DVB (11998): se401: Fix coding style 2009-06-16 19:07:54 -03:00
sh_mobile_ceu_camera.c V4L/DVB sh_mobile_ceu: don't check platform_get_irq's return value against zero 2010-01-17 11:31:37 -02:00
soc_camera_platform.c V4L/DVB (13659): soc-camera: convert to the new mediabus API 2009-12-16 09:27:29 -02:00
soc_camera.c V4L/DVB (13659): soc-camera: convert to the new mediabus API 2009-12-16 09:27:29 -02:00
soc_mediabus.c V4L/DVB (13658): v4l: add a media-bus API for configuring v4l2 subdev pixel and frame formats 2009-12-16 09:27:27 -02:00
stk-sensor.c
stk-webcam.c V4L/DVB (13556): v4l: Remove unneeded video_device::minor assignments 2009-12-16 00:17:57 -02:00
stk-webcam.h
stradis.c V4L/DVB (13556): v4l: Remove unneeded video_device::minor assignments 2009-12-16 00:17:57 -02:00
stv680.c V4L/DVB (13556): v4l: Remove unneeded video_device::minor assignments 2009-12-16 00:17:57 -02:00
stv680.h
tcm825x.c V4L/DVB (12111): tcm825x: remove incorrect __exit_p wrapper 2009-06-23 03:14:48 -03:00
tcm825x.h
tda7432.c
tda9840.c
tda9875.c
tea6415c.c V4L/DVB (11737): Drop stray references to i2c_probe 2009-06-16 18:20:58 -03:00
tea6415c.h
tea6420.c V4L/DVB (11737): Drop stray references to i2c_probe 2009-06-16 18:20:58 -03:00
tea6420.h
ths7303.c V4L/DVB (11742): TI THS7303 video amplifier driver code 2009-06-16 18:20:59 -03:00
tlv320aic23b.c
tuner-core.c V4L/DVB (13964): tuner-core, fix memory leak 2010-02-26 15:10:34 -03:00
tvaudio.c V4L/DVB (13166): remove duplicate structure field initialization 2009-12-05 18:40:40 -02:00
tveeprom.c V4L/DVB (13958): tveeprom.c: use %pM to show MAC address 2010-02-26 15:10:34 -03:00
tvp514x_regs.h V4L/DVB (12246): tvp514x: Migration to sub-device framework 2009-09-19 00:18:09 -03:00
tvp514x.c V4L/DVB (13292): tvp514x: recognize the error case in tvp514x_read_reg() 2009-12-05 18:41:13 -02:00
tvp5150_reg.h
tvp5150.c
tw9910.c V4L/DVB (13669): tw9910: Add sync polarity support 2009-12-16 09:27:40 -02:00
upd64031a.c
upd64083.c
v4l1-compat.c V4L/DVB (12948): v4l1-compat: fix VIDIOC_G_STD handling 2009-09-19 00:15:25 -03:00
v4l2-common.c V4L/DVB (13618): v4l2: Adding helper function to get dv preset description 2009-12-16 00:18:47 -02:00
v4l2-compat-ioctl32.c V4L/DVB: Fix VIDIOC_QBUF compat ioctl32 2010-02-26 15:10:49 -03:00
v4l2-dev.c V4L/DVB (13552): v4l: Replace video_is_unregistered with video_is_registered 2009-12-16 00:17:55 -02:00
v4l2-device.c V4L/DVB (11936): Fix v4l2-device usage of i2c_unregister_device() 2009-06-16 19:07:26 -03:00
v4l2-int-device.c
v4l2-ioctl.c V4L/DVB (13571): v4l: Adding Digital Video Timings APIs 2009-12-16 00:18:03 -02:00
videobuf-core.c V4L/DVB (13415): videobuf-core: explicitly cast page count 2009-12-05 18:41:46 -02:00
videobuf-dma-contig.c V4L/DVB (13598): videobuf_dma_contig_user_get() for non-aligned offsets 2009-12-16 00:18:34 -02:00
videobuf-dma-sg.c V4L/DVB (13377): make struct videobuf_queue_ops constant 2009-12-05 18:41:35 -02:00
videobuf-dvb.c V4L/DVB (13103): create a standard method for dvb adapter drivers to override frontend ioctls 2009-12-05 18:40:21 -02:00
videobuf-vmalloc.c V4L/DVB (13417): Fix videobuf_queue_vmalloc_init() prototype 2009-12-05 18:41:47 -02:00
vino.c V4L/DVB (13556): v4l: Remove unneeded video_device::minor assignments 2009-12-16 00:17:57 -02:00
vino.h
vivi.c V4L/DVB (13944): vivi: Fix test of unsigned in vivi_create_instance() 2010-02-26 15:10:32 -03:00
vp27smpx.c
vpx3220.c V4L/DVB (13241): Cleanup redundant tests on unsigned 2009-12-05 18:41:04 -02:00
w9966.c
w9968cf_decoder.h
w9968cf_vpp.h
w9968cf.c V4L/DVB (13556): v4l: Remove unneeded video_device::minor assignments 2009-12-16 00:17:57 -02:00
w9968cf.h
wm8739.c
wm8775.c
zr364xx.c V4L/DVB (13885): zr364xx: fix support for Aiptek DV T300 2010-02-26 15:10:28 -03:00