linux/drivers/staging/media
Ezequiel Garcia 1b26ba73b1 media: imx: Fix csc/scaler unregister
[ Upstream commit 89b14485caa4b7b2eaf70be0064f0978e68ebeee ]

The csc/scaler device private struct is released by
ipu_csc_scaler_video_device_release(), which can be called
by video_unregister_device() if there are no users
of the underlying struct video device.

Therefore, the mutex can't be held when calling
video_unregister_device() as its memory may be freed
by it, leading to a kernel oops.

Fortunately, the fix is quite simple as no locking
is needed when calling video_unregister_device(): v4l2-core
already has its own internal locking, and the structures
are also properly refcounted.

Fixes: a8ef0488cc ("media: imx: add csc/scaler mem2mem device")
Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-03-04 10:26:20 +01:00
..
allegro-dvt media: allegro: fix type of gop_length in channel_create message 2020-04-17 10:50:02 +02:00
hantro media: hantro: Read be32 words starting at every fourth byte 2020-04-17 10:50:08 +02:00
imx media: imx: Fix csc/scaler unregister 2021-03-04 10:26:20 +01:00
ipu3 media: staging/intel-ipu3: css: Correctly reset some memory 2020-10-29 09:57:31 +01:00
meson/vdec media: meson: add missing allocation failure check on new_buf 2020-02-24 08:36:23 +01:00
omap4iss Staging/IIO driver patches for 5.4-rc1 2019-09-18 11:05:34 -07:00
soc_camera
sunxi media: cedrus: Add missing v4l2_ctrl_request_hdl_put() 2020-09-09 19:12:26 +02:00
tegra-vde media: staging: tegra-vde: Fix build error 2019-08-07 17:04:12 -03:00
Kconfig media: staging: davinci: remove vpfe driver 2019-07-25 06:33:14 -04:00
Makefile media: staging: davinci: remove vpfe driver 2019-07-25 06:33:14 -04:00