android_kernel_motorola_sm6225/drivers/media/video
Jesper Juhl c659395935 [media] tm6000: Don't use pointer after freeing it in tm6000_ir_fini()
In tm6000_ir_fini() there seems to be a problem.
rc_unregister_device(ir->rc); calls rc_free_device() on the pointer it is
given, which frees it.

Subsequently the function does:

  if (!ir->polling)
    __tm6000_ir_int_stop(ir->rc);

and __tm6000_ir_int_stop() dereferences the pointer it is given, which
has already been freed.

and it also does:

  tm6000_ir_stop(ir->rc);

which also dereferences the (already freed) pointer.

So, it seems that the call to rc_unregister_device() should be move
below the calls to __tm6000_ir_int_stop() and tm6000_ir_stop(), so
those don't operate on a already freed pointer.

But, I must admit that I don't know this code *at all*, so someone who
knows the code should take a careful look before applying this
patch. It is based purely on inspection of facts of what is beeing
freed where and not at all on understanding what the code does or why.
I don't even have a means to test it, so beyond testing that the
change compiles it has seen no testing what-so-ever.

Anyway, here's a proposed patch.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Reviewed-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-02-08 10:59:56 -02:00
..
au0828 [media] drivers: media: au0828: Fix dependency for VIDEO_AU0828 2012-01-10 23:29:19 -02:00
bt8xx [media] video: Drop undue references to i2c-algo-bit 2011-11-24 15:11:17 -02:00
cpia2 drivers/media: Add module.h to all files using it implicitly 2011-10-31 19:31:51 -04:00
cx18 Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media 2012-01-18 12:53:54 -08:00
cx88 Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media 2012-01-18 12:53:54 -08:00
cx231xx [media] V4L2: Add per-device-node capabilities 2012-01-23 16:34:27 -02:00
cx23885 [media] cx23885: Don't duplicate xc4000 entry for radio 2012-01-16 11:55:12 -02:00
cx25821 Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media 2012-01-15 12:49:56 -08:00
cx25840 [media] cx25840: Add support for g_input_status 2012-01-10 23:38:20 -02:00
davinci [media] davinci: vpif: remove machine specific header file includes 2012-02-08 10:46:54 -02:00
em28xx Merge branch 'v4l_for_linus' into staging/for_v3.4 2012-01-23 18:11:30 -02:00
et61x251 module_param: check type correctness for module_param_array 2012-01-13 09:32:16 +10:30
gspca Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media 2012-01-15 12:49:56 -08:00
hdpvr module_param: make bool parameters really bool (drivers & misc) 2012-01-13 09:32:20 +10:30
ivtv [media] ivtv: setup per-device caps 2012-01-23 16:44:24 -02:00
m5mols [media] m5mols: Enable v4l subdev device node 2011-12-30 14:39:34 -02:00
marvell-ccic Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media 2012-01-15 12:49:56 -08:00
omap [media] omap_vout: fix section mismatch 2012-01-23 15:27:17 -02:00
omap3isp Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media 2012-01-15 12:49:56 -08:00
pvrusb2 [media] V4L2: Add per-device-node capabilities 2012-01-23 16:34:27 -02:00
pwc [media] pwc: Simplify leds parameter parsing 2012-01-16 11:28:13 -02:00
s5p-fimc [media] s5p-fimc: Remove linux/version.h include from fimc-mdevice.c 2012-01-17 23:06:24 -02:00
s5p-g2d [media] s5p-g2d: fixed a bug in controls setting function 2012-01-17 22:54:23 -02:00
s5p-jpeg [media] s5p-jpeg: adapt to recent videobuf2 changes 2012-01-17 22:54:45 -02:00
s5p-mfc [media] s5p-mfc: Remove linux/version.h include from s5p_mfc.c 2012-01-17 23:06:13 -02:00
s5p-tv [media] convert drivers/media/* to use module_platform_driver() 2012-01-10 23:27:13 -02:00
saa7134 [media] rc-videomate-m1f.c Rename to match remote controler name 2012-01-10 23:38:19 -02:00
saa7164 [media] saa7164: remove duplicate initialization 2012-01-16 12:35:55 -02:00
sn9c102 module_param: check type correctness for module_param_array 2012-01-13 09:32:16 +10:30
tlg2300 [media] tlg2300: fix up check_firmware() return 2012-01-16 12:38:00 -02:00
tm6000 [media] tm6000: Don't use pointer after freeing it in tm6000_ir_fini() 2012-02-08 10:59:56 -02:00
usbvision Merge tag 'v3.2-rc2' into staging/for_v3.3 2011-11-23 19:42:09 -02:00
uvc [media] uvcvideo: Use kcalloc instead of kzalloc to allocate array 2011-12-30 17:22:12 -02:00
zoran Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media 2012-01-18 12:53:54 -08:00
adp1653.c Merge branch 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux 2011-11-06 19:44:47 -08:00
adv7170.c [media] Make use of media bus pixel codes in adv7170 driver 2011-11-07 12:42:56 -02:00
adv7175.c [media] adv7175: Make use of media bus pixel codes 2011-10-19 07:59:05 -02:00
adv7180.c
adv7343.c [media] adv7343: use control framework 2011-03-21 20:31:49 -03:00
adv7343_regs.h [media] adv7343: use control framework 2011-03-21 20:31:49 -03:00
ak881x.c drivers/media: Add module.h to all files using it implicitly 2011-10-31 19:31:51 -04:00
arv.c [media] Stop using linux/version.h on most video drivers 2011-07-27 17:53:12 -03:00
as3645a.c [media] as3645a: Fix compilation by including slab.h 2012-01-17 23:07:13 -02:00
atmel-isi.c [media] V4L: atmel-isi: add clk_prepare()/clk_unprepare() functions 2012-01-23 18:13:21 -02:00
bt819.c [media] vpx3220, bt819: fix compiler warnings 2011-09-06 14:46:17 -03:00
bt856.c
bt866.c
btcx-risc.c
btcx-risc.h
bw-qcam.c [media] drivers/media/video: add missing kfree 2011-07-27 17:55:55 -03:00
c-qcam.c module_param: make bool parameters really bool (drivers & misc) 2012-01-13 09:32:20 +10:30
cs53l32a.c module_param: make bool parameters really bool (drivers & misc) 2012-01-13 09:32:20 +10:30
cs5345.c module_param: make bool parameters really bool (drivers & misc) 2012-01-13 09:32:20 +10:30
cs8420.h
cx2341x.c [media] v4l2-ctrls: use const char * const * for the menu arrays 2010-12-30 08:02:14 -02:00
fsl-viu.c [media] convert drivers/media/* to use module_platform_driver() 2012-01-10 23:27:13 -02:00
hexium_gemini.c Merge branch 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux 2011-11-06 19:44:47 -08:00
hexium_orion.c Merge branch 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux 2011-11-06 19:44:47 -08:00
ibmmpeg2.h
imx074.c Merge branch 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux 2011-11-06 19:44:47 -08:00
indycam.c
indycam.h
ir-kbd-i2c.c [media] cx231xx: Fix unregister logic 2012-01-10 22:35:29 -02:00
Kconfig [media] Exynos4 JPEG codec v4l2 driver 2012-01-10 23:21:52 -02:00
ks0127.c
ks0127.h
m52790.c [media] v4l: make sure drivers supply a zeroed struct v4l2_subdev 2011-04-29 12:33:28 -03:00
Makefile [media] Exynos4 JPEG codec v4l2 driver 2012-01-10 23:21:52 -02:00
mem2mem_testdev.c [media] V4L: vb2: prepare to support multi-size buffers 2011-11-03 18:28:28 -02:00
meye.c [media] v4l2-ioctl: add priority handling support 2011-03-22 16:37:59 -03:00
meye.h
msp3400-driver.c module_param: make bool parameters really bool (drivers & misc) 2012-01-13 09:32:20 +10:30
msp3400-driver.h module_param: make bool parameters really bool (drivers & misc) 2012-01-13 09:32:20 +10:30
msp3400-kthreads.c [media] msp3400: Add standards detection to the driver 2011-10-08 08:01:34 -03:00
mt9m001.c Merge tag 'v3.2-rc2' into staging/for_v3.3 2011-11-23 19:42:09 -02:00
mt9m111.c [media] mt9m111: properly implement .s_crop and .s_fmt(), reset on STREAMON 2012-01-06 11:00:40 -02:00
mt9p031.c [media] v4l: mt9p031/mt9t001: Use i2c_smbus_{read|write}_word_swapped() 2011-11-07 11:27:29 -02:00
mt9t001.c [media] v4l: mt9p031/mt9t001: Use i2c_smbus_{read|write}_word_swapped() 2011-11-07 11:27:29 -02:00
mt9t031.c Merge tag 'v3.2-rc2' into staging/for_v3.3 2011-11-23 19:42:09 -02:00
mt9t112.c [media] V4L: mt9t112: use after free in mt9t112_probe() 2011-12-11 09:42:40 -02:00
mt9v011.c drivers/media: Add module.h to all files using it implicitly 2011-10-31 19:31:51 -04:00
mt9v022.c Merge tag 'v3.2-rc2' into staging/for_v3.3 2011-11-23 19:42:09 -02:00
mt9v032.c Merge tag 'v3.2-rc2' into staging/for_v3.3 2011-11-23 19:42:09 -02:00
mx1_camera.c [media] soc-camera: remove redundant parameter from .set_bus_param() 2012-01-06 11:00:23 -02:00
mx2_camera.c [media] media i.MX27 camera: Fix field_count handling 2012-01-06 11:02:14 -02:00
mx3_camera.c Merge branch 'next' of git://git.infradead.org/users/vkoul/slave-dma 2012-01-17 18:40:24 -08:00
mxb.c Merge branch 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux 2011-11-06 19:44:47 -08:00
mxb.h
noon010pc30.c Merge branch 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux 2011-11-06 19:44:47 -08:00
omap1_camera.c [media] convert drivers/media/* to use module_platform_driver() 2012-01-10 23:27:13 -02:00
omap24xxcam-dma.c [media] [trivial] omap24xxcam-dma: Fix logical test 2011-12-09 20:28:42 -02:00
omap24xxcam.c [media] convert drivers/media/* to use module_platform_driver() 2012-01-10 23:27:13 -02:00
omap24xxcam.h
ov772x.c [media] V4L: replace soc-camera specific soc_mediabus.h with v4l2-mediabus.h 2011-11-03 18:29:04 -02:00
ov2640.c [media] V4L: replace soc-camera specific soc_mediabus.h with v4l2-mediabus.h 2011-11-03 18:29:04 -02:00
ov5642.c [media] media: ov5642: Add support for arbitrary resolution 2011-11-03 18:29:05 -02:00
ov6650.c [media] [trivial] ov6650: Fix typo 2012-02-08 10:49:45 -02:00
ov7670.c module_param: make bool parameters really bool (drivers & misc) 2012-01-13 09:32:20 +10:30
ov9640.c [media] V4L: replace soc-camera specific soc_mediabus.h with v4l2-mediabus.h 2011-11-03 18:29:04 -02:00
ov9640.h [media] ov9640: convert to the control framework 2011-11-03 18:28:36 -02:00
ov9740.c [media] V4L: replace soc-camera specific soc_mediabus.h with v4l2-mediabus.h 2011-11-03 18:29:04 -02:00
pms.c [media] Stop using linux/version.h on most video drivers 2011-07-27 17:53:12 -03:00
pxa_camera.c [media] convert drivers/media/* to use module_platform_driver() 2012-01-10 23:27:13 -02:00
rj54n1cb0c.c Merge branch 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux 2011-11-06 19:44:47 -08:00
s5k6aa.c drivers/media: video/a5k6aa is a module and so needs module.h 2011-11-08 14:56:50 -05:00
s2255drv.c USB: convert drivers/media/* to use module_usb_driver() 2011-11-18 09:46:12 -08:00
saa711x_regs.h
saa717x.c
saa6588.c [media] saa6588: rename rds.h to saa6588.h 2010-12-29 08:17:18 -02:00
saa7110.c [media] saa7110: use control framework 2011-03-21 20:31:50 -03:00
saa7115.c module_param: make bool parameters really bool (drivers & misc) 2012-01-13 09:32:20 +10:30
saa7121.h
saa7127.c
saa7146.h
saa7146reg.h
saa7185.c
saa7191.c
saa7191.h
sh_mobile_ceu_camera.c [media] soc-camera: remove redundant parameter from .set_bus_param() 2012-01-06 11:00:23 -02:00
sh_mobile_csi2.c [media] convert drivers/media/* to use module_platform_driver() 2012-01-10 23:27:13 -02:00
sh_vou.c drivers/media: Add module.h to all files using it implicitly 2011-10-31 19:31:51 -04:00
soc_camera.c [media] soc-camera: change order of removing device 2012-01-06 11:00:55 -02:00
soc_camera_platform.c [media] convert drivers/media/* to use module_platform_driver() 2012-01-10 23:27:13 -02:00
soc_mediabus.c [media] V4L: soc-camera: add helper functions for new bus configuration type 2011-11-03 18:27:13 -02:00
sr030pc30.c Merge branch 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux 2011-11-06 19:44:47 -08:00
stk-sensor.c
stk-webcam.c Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media 2012-01-15 12:49:56 -08:00
stk-webcam.h
tcm825x.c drivers/media: Add module.h to all files using it implicitly 2011-10-31 19:31:51 -04:00
tcm825x.h
tda7432.c [media] Correct and add some parameter descriptions 2011-07-27 17:52:59 -03:00
tda9840.c [media] v4l: make sure drivers supply a zeroed struct v4l2_subdev 2011-04-29 12:33:28 -03:00
tea6415c.c [media] v4l: make sure drivers supply a zeroed struct v4l2_subdev 2011-04-29 12:33:28 -03:00
tea6415c.h
tea6420.c [media] v4l: make sure drivers supply a zeroed struct v4l2_subdev 2011-04-29 12:33:28 -03:00
tea6420.h
ths7303.c
timblogiw.c Merge branch 'next' of git://git.infradead.org/users/vkoul/slave-dma 2012-01-17 18:40:24 -08:00
tlv320aic23b.c [media] tlv320aic23b: use control framework 2011-03-21 20:31:50 -03:00
tuner-core.c [media] cx88: Fix radio support for Leadtek DTV2000H J 2012-01-06 17:16:34 -02:00
tvaudio.c [media] tvaudio: fix compiler warnings 2011-09-06 14:44:30 -03:00
tveeprom.c [media] tveeprom: update hauppauge tuner list thru 174 2011-05-20 09:27:15 -03:00
tvp514x.c module_param: make bool parameters really bool (drivers & misc) 2012-01-13 09:32:20 +10:30
tvp514x_regs.h
tvp5150.c [media] media: tvp5150: Add mbus_fmt callbacks 2012-01-07 11:54:52 -02:00
tvp5150_reg.h [media] tvp5150: Add video format registers configuration values 2011-10-08 08:01:52 -03:00
tvp7002.c module_param: make bool parameters really bool (drivers & misc) 2012-01-13 09:32:20 +10:30
tvp7002_reg.h
tw9910.c [media] V4L: replace soc-camera specific soc_mediabus.h with v4l2-mediabus.h 2011-11-03 18:29:04 -02:00
upd64031a.c [media] v4l: make sure drivers supply a zeroed struct v4l2_subdev 2011-04-29 12:33:28 -03:00
upd64083.c module_param: make bool parameters really bool (drivers & misc) 2012-01-13 09:32:20 +10:30
v4l2-common.c [media] v4l2-ctrls: add new bitmask control type 2011-07-27 17:55:38 -03:00
v4l2-compat-ioctl32.c [media] v4l: add support for selection api 2012-01-10 23:17:45 -02:00
v4l2-ctrls.c [media] v4l2-ctrls: make control names consistent 2012-01-17 23:04:05 -02:00
v4l2-dev.c [media] media: fix truncated entity specification 2011-12-20 09:31:50 -02:00
v4l2-device.c [media] media: fix truncated entity specification 2011-12-20 09:31:50 -02:00
v4l2-event.c Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media 2011-11-12 00:03:50 -02:00
v4l2-fh.c drivers/media: Add export.h for EXPORT_SYMBOL/THIS_MODULE as required 2011-10-31 19:31:51 -04:00
v4l2-int-device.c drivers/media: Add module.h to all files using it implicitly 2011-10-31 19:31:51 -04:00
v4l2-ioctl.c [media] V4L2: Add per-device-node capabilities 2012-01-23 16:34:27 -02:00
v4l2-mem2mem.c [media] media: mem2mem: eliminate possible NULL pointer dereference 2011-09-06 15:03:26 -03:00
v4l2-subdev.c [media] v4l: Add VIDIOC_LOG_STATUS support for sub-device nodes 2012-01-06 13:00:11 -02:00
via-camera.c Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media 2012-01-15 12:49:56 -08:00
via-camera.h
videobuf-core.c [media] V4L: remove V4L1 compatibility mode 2010-12-29 08:17:07 -02:00
videobuf-dma-contig.c Revert "[media] V4L: videobuf, don't use dma addr as physical" 2011-04-19 10:54:44 -07:00
videobuf-dma-sg.c [media] videobuf_pages_to_sg: sglist[0] length problem 2011-07-27 17:52:19 -03:00
videobuf-dvb.c [media] videobuf-dvb: avoid spurious ENOMEM when CONFIG_DVB_NET=n 2012-01-06 12:42:19 -02:00
videobuf-vmalloc.c
videobuf2-core.c [media] videobuf2-core: fix a warning at vb2 2011-12-30 16:12:43 -02:00
videobuf2-dma-contig.c [media] media: vb2: dma contig allocator: use dma_addr instread of paddr 2011-09-06 15:05:10 -03:00
videobuf2-dma-sg.c [media] media: vb2: fix potential deadlock in mmap vs. get_userptr handling 2011-12-30 16:06:49 -02:00
videobuf2-memops.c [media] media: vb2: fix potential deadlock in mmap vs. get_userptr handling 2011-12-30 16:06:49 -02:00
videobuf2-vmalloc.c [media] media: vb2: vmalloc-based allocator user pointer handling 2011-12-30 16:08:06 -02:00
vino.c [media] v4l: Casting (void *) value returned by kmalloc is useless 2011-11-24 21:06:57 -02:00
vino.h
vivi.c [media] vivi: don't set V4L2_CAP_DEVICE_CAPS for the device_caps field 2012-01-26 15:35:54 -02:00
vp27smpx.c
vpx3220.c [media] vpx3220, bt819: fix compiler warnings 2011-09-06 14:46:17 -03:00
w9966.c [media] Stop using linux/version.h on most video drivers 2011-07-27 17:53:12 -03:00
wm8739.c
wm8775.c [media] Add proper audio support for Nova-S Plus with wm8775 ADC 2011-03-21 20:32:19 -03:00
zr364xx.c USB: convert drivers/media/* to use module_usb_driver() 2011-11-18 09:46:12 -08:00