linux/drivers/media/platform
Shuah Khan d695c12c57 [media] media: s5p-mfc fix invalid memory access from s5p_mfc_release()
If s5p_mfc_release() runs after s5p_mfc_remove(), the former will access
invalid s5p_mfc_dev pointer saved in the s5p_mfc_ctx and runs into kernel
paging request errors.

Clear ctx dev pointer in s5p_mfc_remove() and change s5p_mfc_release() to
avoid work that requires ctx->dev.

odroid kernel: Unable to handle kernel paging request at virtual address
    f17c1104
odroid kernel: pgd = ebca4000
odroid kernel: [f17c1104] *pgd=6e23d811, *pte=00000000, *ppte=00000000
odroid kernel: Internal error: Oops: 807 [#1] PREEMPT SMP ARM
odroid kernel: Modules linked in: cpufreq_userspace cpufreq_powersave
    cpufreq_conservative s5p_mfc s5p_jpeg v4l2_mem2mem
    videobuf2_dma_contig videobuf2_memops videobuf2_v4l2 videobuf2_core
    v4l2_common videodev media
odroid kernel: Hardware name: SAMSUNG EXYNOS (Flattened Device Tree)
odroid kernel: task: c2241400 ti: e7018000 task.ti: e7018000
odroid kernel: PC is at s5p_mfc_reset+0x40/0x28c [s5p_mfc]
odroid kernel: LR is at s5p_mfc_reset+0x34/0x28c [s5p_mfc]
odroid kernel: pc : [<bf15bfbc>]    lr : [<bf15bfb0>] psr: 60010013
odroid kernel: [<bf15bfbc>] (s5p_mfc_reset [s5p_mfc]) from [<bf15c62c>]
    (s5p_mfc_deinit_hw+0x14/0x3c [s5p_mfc])
odroid kernel: [<bf15c62c>] (s5p_mfc_deinit_hw [s5p_mfc]) from [<bf155958>]
    (s5p_mfc_release+0xac/0x1c4 [s5p_mfc])
odroid kernel: [<bf155958>] (s5p_mfc_release [s5p_mfc]) from [<bf021344>]
    (v4l2_release+0x38/0x74 [videodev])
odroid kernel: [<bf021344>] (v4l2_release [videodev]) from [<c01e4274>]
    (__fput+0x80/0x1c8)
odroid kernel: [<c01e4274>] (__fput) from [<c0135c58>]
    (task_work_run+0x94/0xc8)
odroid kernel: [<c0135c58>] (task_work_run) from [<c010a9d4>]
    (do_work_pending+0x7c/0xa4)
odroid kernel: [<c010a9d4>] (do_work_pending) from [<c0107794>]
    (slow_work_pending+0xc/0x20)
odroid kernel: Code: eb3edacc e5953078 e3a06000 e2833c11 (e5836004)

Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
Tested-by: Luis de Bethencourt <luisbg@osg.samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-24 13:31:12 -03:00
..
am437x [media] vb2: replace void *alloc_ctxs by struct device *alloc_devs 2016-07-08 14:45:07 -03:00
atmel [media] atmel-isc: add the Image Sensor Controller code 2016-08-22 12:59:58 -03:00
blackfin [media] vb2: replace void *alloc_ctxs by struct device *alloc_devs 2016-07-08 14:45:07 -03:00
coda [media] media: coda: Fix probe() if reset controller is missing 2016-07-08 16:34:59 -03:00
davinci [media] vpbe_display: convert g/s_crop to g/s_selection 2016-08-24 09:52:53 -03:00
exynos4-is [media] exynos4-is: Fix fimc_is_parse_sensor_config() nodes handling 2016-08-24 13:31:09 -03:00
exynos-gsc [media] gsc-m2m: improve v4l2_capability driver and card fields 2016-08-24 13:31:11 -03:00
marvell-ccic [media] mcam-core: use v4l2_s_ctrl instead of the s_ctrl op 2016-07-12 11:13:30 -03:00
mtk-vcodec [media] mtk-vcodec: constify venc_common_if structures 2016-08-24 08:46:19 -03:00
mtk-vpu [media] VPU: mediatek: remove redundant dev_err call in mtk_vpu_probe() 2016-07-13 08:00:23 -03:00
omap [media] omap_vout: convert g/s_crop to g/s_selection 2016-08-24 09:49:44 -03:00
omap3isp [media] v4l2: remove g/s_crop from video ops 2016-08-24 09:46:09 -03:00
rcar-vin [media] v4l2-subdev: rename cropcap to g_pixelaspect 2016-08-24 09:55:15 -03:00
s3c-camif [media] vb2: replace void *alloc_ctxs by struct device *alloc_devs 2016-07-08 14:45:07 -03:00
s5p-g2d [media] vb2: replace void *alloc_ctxs by struct device *alloc_devs 2016-07-08 14:45:07 -03:00
s5p-jpeg [media] s5p-jpeg: only fill driver's name in capabilities driver field 2016-08-24 13:31:10 -03:00
s5p-mfc [media] media: s5p-mfc fix invalid memory access from s5p_mfc_release() 2016-08-24 13:31:12 -03:00
soc_camera [media] v4l2: remove g/s_crop from video ops 2016-08-24 09:46:09 -03:00
sti dma-mapping: use unsigned long for dma_attrs 2016-08-04 08:50:07 -04:00
ti-vpe [media] vb2: replace void *alloc_ctxs by struct device *alloc_devs 2016-07-08 14:45:07 -03:00
vivid [media] vivid: return -ENODATA if the current input doesn't support g/s_selection 2016-08-24 09:57:01 -03:00
vsp1 [media] vsp1: use __maybe_unused for PM handlers 2016-07-13 13:46:12 -03:00
xilinx [media] vb2: replace void *alloc_ctxs by struct device *alloc_devs 2016-07-08 14:45:07 -03:00
arv.c [media] media: remove the setting of the flag V4L2_FL_USE_FH_PRIO 2014-07-04 16:14:59 -03:00
fsl-viu.c [media] fsl-viu: drop format names 2015-08-11 06:59:09 -03:00
Kconfig [media] s5p-tv: remove obsolete driver 2016-08-24 06:35:52 -03:00
m2m-deinterlace.c [media] vb2: replace void *alloc_ctxs by struct device *alloc_devs 2016-07-08 14:45:07 -03:00
Makefile [media] s5p-tv: remove obsolete driver 2016-08-24 06:35:52 -03:00
mx2_emmaprp.c [media] vb2: replace void *alloc_ctxs by struct device *alloc_devs 2016-07-08 14:45:07 -03:00
rcar_jpu.c [media] vb2: replace void *alloc_ctxs by struct device *alloc_devs 2016-07-08 14:45:07 -03:00
rcar-fcp.c [media] v4l: Add Renesas R-Car FCP driver 2016-06-17 07:57:35 -03:00
sh_veu.c [media] vb2: replace void *alloc_ctxs by struct device *alloc_devs 2016-07-08 14:45:07 -03:00
sh_vou.c [media] v4l2: remove g/s_crop from video ops 2016-08-24 09:46:09 -03:00
via-camera.c [media] via-camera: use v4l2_s_ctrl instead of the s_ctrl op 2016-07-12 11:14:04 -03:00
via-camera.h
vim2m.c [media] vim2m: copy the other colorspace-related fields as well 2016-07-28 20:13:56 -03:00