linux/drivers/media/platform
Johan Hovold 43acb728bb media: davinci: vpif: fix use-after-free on driver unbind
The driver allocates and registers two platform device structures during
probe, but the devices were never deregistered on driver unbind.

This results in a use-after-free on driver unbind as the device
structures were allocated using devres and would be freed by driver
core when remove() returns.

Fix this by adding the missing deregistration calls to the remove()
callback and failing probe on registration errors.

Note that the platform device structures must be freed using a proper
release callback to avoid leaking associated resources like device
names.

Fixes: 479f7a1181 ("[media] davinci: vpif: adaptions for DT support")
Cc: stable@vger.kernel.org      # 4.12
Cc: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Reviewed-by: Lad Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-01-23 21:18:43 +01:00
..
allegro-dvt media: replace setting of bytesused with vb2_set_plane_payload 2021-12-07 11:29:56 +01:00
am437x media: am437x: Make use of the helper function devm_platform_ioremap_resource() 2021-09-30 10:07:48 +02:00
atmel media: atmel: fix the ispck initialization 2021-09-30 10:08:00 +02:00
cadence media: cadence: Make use of the helper function devm_platform_ioremap_resource() 2021-09-30 10:07:48 +02:00
coda media: coda/imx-vdoa: Handle dma_set_coherent_mask error codes 2021-12-14 16:19:04 +01:00
davinci media: davinci: vpif: fix use-after-free on driver unbind 2022-01-23 21:18:43 +01:00
exynos4-is media: exynos4-is: Make use of the helper function devm_platform_ioremap_resource() 2021-09-30 10:07:49 +02:00
exynos-gsc media: exynos-gsc: Make use of the helper function devm_platform_ioremap_resource() 2021-09-30 10:07:49 +02:00
imx-jpeg media: imx-jpeg: Add pm-runtime support for imx-jpeg 2021-10-19 08:08:39 +01:00
marvell-ccic media: marvell-ccic: drop to_cam() unused function 2021-11-29 10:15:04 +01:00
meson/ge2d media: meson: ge2d: Make use of the helper function devm_platform_ioremap_resource() 2021-09-30 10:07:50 +02:00
mtk-jpeg media: mtk-jpeg: Remove unnecessary print function dev_err() 2021-11-30 12:17:35 +01:00
mtk-mdp media: mtk-mdp: address a clang warning 2021-11-29 13:23:25 +01:00
mtk-vcodec media: mtk-vcodec: potential dereference of null pointer 2022-01-23 21:18:42 +01:00
mtk-vpu media: mtk-vpu: Remove redundant 'flush_workqueue()' calls 2021-11-15 08:12:07 +00:00
omap media: omap_vout: use dma_addr_t consistently 2021-10-08 11:26:13 +02:00
omap3isp media: omap3isp.h: fix kernel-doc warnings 2021-11-30 12:24:46 +01:00
qcom media: camss: Apply vfe_get/vfe_put fix to SDM845 2022-01-23 21:18:41 +01:00
rcar-vin media: rcar-vin: Do not hold the group lock when unregistering notifier 2021-12-07 11:29:55 +01:00
rockchip media: rkisp1: fix grey format iommu page faults 2022-01-23 21:18:42 +01:00
s3c-camif media: driver: s3c_camif: move s3c_camif_unregister_subdev out of camif_unregister_media_entities 2021-11-30 12:06:27 +01:00
s5p-g2d media: s5p-g2d: Make use of the helper function devm_platform_ioremap_resource() 2021-09-30 10:07:52 +02:00
s5p-jpeg media: s5p-jpeg: Constify struct v4l2_m2m_ops 2021-12-07 11:29:56 +01:00
s5p-mfc media: s5p-mfc: Use 'bitmap_zalloc()' when applicable 2021-11-15 08:12:02 +00:00
sti media: c8sectpfe: fix double free in configure_channels() 2021-12-14 16:19:04 +01:00
stm32 media: stm32-dma2d: fix compile errors when W=1 2021-11-15 08:12:05 +00:00
sunxi media: sun6i-csi: Allow the video device to be open multiple times 2021-09-30 10:07:59 +02:00
ti-vpe media: v4l: async: Rename async nf functions, clean up long lines 2021-09-30 10:07:35 +02:00
vsp1 media: vsp1: Add support for the V3U VSPD 2021-10-08 11:26:13 +02:00
xilinx media: xilinx: Make use of the helper function devm_platform_ioremap_resource() 2021-09-30 10:07:53 +02:00
aspeed-video.c media: aspeed: Update signal status immediately to ensure sane hw state 2021-11-15 08:12:05 +00:00
fsl-viu.c
imx-pxp.c media: imx-pxp: Add rotation support 2021-11-30 11:56:38 +01:00
imx-pxp.h
Kconfig media: stm32-dma2d: fix compile-testing failed 2021-11-15 08:12:05 +00:00
m2m-deinterlace.c
Makefile media: stm32-dma2d: STM32 DMA2D driver 2021-11-15 08:11:33 +00:00
mx2_emmaprp.c media: mx2_emmaprp: Make use of the helper function devm_platform_ioremap_resource() 2021-09-30 10:07:50 +02:00
pxa_camera.c media: v4l: async: Rename async nf functions, clean up long lines 2021-09-30 10:07:35 +02:00
rcar_drif.c media: rcar_drif: Make use of the helper function devm_platform_get_and_ioremap_resource() 2021-09-30 10:07:53 +02:00
rcar_fdp1.c media: rcar_fdp1: Fix the correct variable assignments 2021-11-30 12:06:48 +01:00
rcar_jpu.c media: rcar_jpu: Make use of the helper function devm_platform_ioremap_resource() 2021-09-30 10:07:51 +02:00
rcar-fcp.c media: rcar-fcp: use pm_runtime_resume_and_get() 2021-05-20 16:02:36 +02:00
rcar-isp.c media: rcar-isp: Add Renesas R-Car Image Signal Processor driver 2021-10-08 13:26:43 +02:00
renesas-ceu.c media: renesas-ceu: Make use of the helper function devm_platform_ioremap_resource() 2021-09-30 10:07:51 +02:00
sh_vou.c media: sh_vou: fix pm_runtime_get_sync() usage count 2021-05-10 11:36:34 +02:00
via-camera.c media: via-camera: deleted these redundant semicolons 2021-09-30 10:07:53 +02:00
via-camera.h
video-mux.c media: v4l: async: Rename async nf functions, clean up long lines 2021-09-30 10:07:35 +02:00