1
0
Fork 0
alistair23-linux/drivers/media/platform
Benoit Parrot 15ae94fe22 media: ti-vpe: cal: fix a kernel oops when unloading module
commit 80264809ea upstream.

After the switch to use v4l2_async_notifier_add_subdev() and
v4l2_async_notifier_cleanup(), unloading the ti_cal module would cause a
kernel oops.

This was root cause to the fact that v4l2_async_notifier_cleanup() tries
to kfree the asd pointer passed into v4l2_async_notifier_add_subdev().

In our case the asd reference was from a statically allocated struct.
So in effect v4l2_async_notifier_cleanup() was trying to free a pointer
that was not kalloc.

So here we switch to using a kzalloc struct instead of a static one.
To achieve this we re-order some of the calls to prevent asd allocation
from leaking.

Fixes: d079f94c90 ("media: platform: Switch to v4l2_async_notifier_add_subdev")
Cc: stable@vger.kernel.org
Signed-off-by: Benoit Parrot <bparrot@ti.com>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-04-17 10:50:08 +02:00
..
am437x media: am437x-vpfe: Setting STD to current value is not an error 2019-12-31 16:43:17 +01:00
atmel media: atmel: atmel-isi: fix timeout value for stop streaming 2019-08-23 07:27:55 -03:00
cadence media: v4l: cadence: Fix how unsued lanes are handled in 'csi2rx_start()' 2020-01-17 19:48:57 +01:00
cec-gpio Linux 5.2-rc2 2019-05-28 11:21:51 -04:00
coda media: coda: fix deadlock between decoder picture run and start command 2020-01-17 19:48:57 +01:00
cros-ec-cec chrome platform changes for v5.4 2019-09-19 14:14:28 -07:00
davinci media: use the BIT() macro 2019-08-26 14:08:50 -03:00
exynos-gsc media: media/platform: don't set description in ENUM_FMT 2019-07-22 14:43:59 -04:00
exynos4-is media: exynos4-is: Fix recursive locking in isp_video_release() 2020-01-17 19:48:57 +01:00
marvell-ccic media: marvell-ccic: mmp: add MODULE_DEVICE_TABLE 2019-07-25 06:27:14 -04:00
meson media: meson/ao-cec: move cec_notifier_cec_adap_register after hw setup 2019-12-31 16:43:44 +01:00
mtk-jpeg media: mtk-jpeg: Use vb2_get_buffer 2019-06-21 16:22:02 -04:00
mtk-mdp media: platform: mtk-mdp: mtk_mdp_core: Add of_node_put() before goto 2019-08-13 11:49:46 -03:00
mtk-vcodec media: mtk-vcodec: flag OUTPUT formats with V4L2_FMT_FLAG_DYN_RESOLUTION 2019-08-19 14:57:40 -03:00
mtk-vpu Linux 5.2-rc4 2019-06-11 12:09:28 -04:00
omap media updates for v5.4-rc1 2019-09-17 17:55:23 -07:00
omap3isp media: use the BIT() macro 2019-08-26 14:08:50 -03:00
qcom media: venus: firmware: Ignore secure call error on first resume 2020-04-17 10:50:08 +02:00
rcar-vin media: rcar-vin: Fix incorrect return statement in rvin_try_format() 2020-01-17 19:48:56 +01:00
rockchip/rga media: Remove dev_err() usage after platform_get_irq() 2019-08-07 17:08:33 -03:00
s3c-camif media: use the BIT() macro 2019-08-26 14:08:50 -03:00
s5p-cec media: s5p-cec: use cec_notifier_cec_adap_(un)register 2019-07-23 08:39:27 -04:00
s5p-g2d media: s3c-camif/s5p-g2d/s5p-jpeg: set device_caps in struct video_device 2019-07-22 14:45:40 -04:00
s5p-jpeg media: don't do a 31 bit shift on a signed int 2019-08-26 14:11:10 -03:00
s5p-mfc media: don't do a 31 bit shift on a signed int 2019-08-26 14:11:10 -03:00
seco-cec media: seco-cec: Add a missing 'release_region()' in an error handling path 2019-12-31 16:43:19 +01:00
sti media: sti: bdisp: fix a possible sleep-in-atomic-context bug in bdisp_device_run() 2020-02-24 08:36:26 +01:00
stm32 media: stm32-dcmi: Delete an unnecessary of_node_put() call in dcmi_probe() 2019-08-29 10:23:02 -03:00
sunxi media: sun4i-csi: Fix [HV]sync polarity handling 2020-02-24 08:36:25 +01:00
tegra-cec media: use the BIT() macro 2019-08-26 14:08:50 -03:00
ti-vpe media: ti-vpe: cal: fix a kernel oops when unloading module 2020-04-17 10:50:08 +02:00
vicodec media: vicodec: process all 4 components for RGB32 formats 2020-03-12 13:00:21 +01:00
vimc media: vimc: Fix gpf in rmmod path when stream is active 2019-12-31 16:43:28 +01:00
vivid media: vivid: media_device_cleanup was called too early 2019-12-31 16:44:44 +01:00
vsp1 media: use the BIT() macro 2019-08-26 14:08:50 -03:00
xilinx media: use the BIT() macro 2019-08-26 14:08:50 -03:00
Kconfig chrome platform changes for v5.4 2019-09-19 14:14:28 -07:00
Makefile media: sunxi: Refactor the Makefile and Kconfig 2019-08-23 07:29:05 -03:00
aspeed-video.c media: aspeed-video: Fix memory leaks in aspeed_video_probe 2020-01-17 19:48:58 +01:00
fsl-viu.c media: don't do a 31 bit shift on a signed int 2019-08-26 14:11:10 -03:00
imx-pxp.c media: Remove dev_err() usage after platform_get_irq() 2019-08-07 17:08:33 -03:00
imx-pxp.h media: imx-pxp: add i.MX Pixel Pipeline driver 2018-09-11 13:32:17 -04:00
m2m-deinterlace.c media: m2m-deinterlace: use struct v4l2_fh 2019-07-23 11:49:41 -04:00
mx2_emmaprp.c media: don't do a 31 bit shift on a signed int 2019-08-26 14:11:10 -03:00
pxa_camera.c media: don't do a 31 bit shift on a signed int 2019-08-26 14:11:10 -03:00
rcar-fcp.c Char/Misc driver patches for 4.19-rc1 2018-08-18 11:04:51 -07:00
rcar_drif.c media: rcar_drif: fix a memory disclosure 2019-12-31 16:44:39 +01:00
rcar_fdp1.c media: fdp1: Fix a memory leak bug 2019-08-26 10:41:17 -03:00
rcar_jpu.c media: v4l2: Get rid of ->vidioc_enum_fmt_vid_{cap, out}_mplane 2019-06-05 07:48:32 -04:00
renesas-ceu.c media: Remove dev_err() usage after platform_get_irq() 2019-08-07 17:08:33 -03:00
sh_veu.c media: sh_veu: convert to struct v4l2_fh 2019-07-25 06:29:26 -04:00
sh_vou.c media: sh_veu/sh_vou: set device_caps in struct video_device 2019-07-22 15:09:06 -04:00
via-camera.c media: via-camera: convert to the vb2 framework 2019-07-30 12:18:34 -04:00
via-camera.h media: fix usage of whitespaces and on indentation 2018-01-04 13:12:01 -05:00
video-mux.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
vim2m.c media: vim2m: media_device_cleanup was called too early 2019-12-31 16:45:17 +01:00