linux/drivers/gpu/drm/bridge
Paul Cercueil ce450934a0 drm: bridge/panel: Cleanup connector on bridge detach
commit 4d906839d3 upstream.

If we don't call drm_connector_cleanup() manually in
panel_bridge_detach(), the connector will be cleaned up with the other
DRM objects in the call to drm_mode_config_cleanup(). However, since our
drm_connector is devm-allocated, by the time drm_mode_config_cleanup()
will be called, our connector will be long gone. Therefore, the
connector must be cleaned up when the bridge is detached to avoid
use-after-free conditions.

v2: Cleanup connector only if it was created

v3: Add FIXME

v4: (Use connector->dev) directly in if() block

Fixes: 13dfc0540a ("drm/bridge: Refactor out the panel wrapper from the lvds-encoder bridge.")
Cc: <stable@vger.kernel.org> # 4.12+
Cc: Andrzej Hajda <a.hajda@samsung.com>
Cc: Neil Armstrong <narmstrong@baylibre.com>
Cc: Laurent Pinchart <Laurent.pinchart@ideasonboard.com>
Cc: Jonas Karlman <jonas@kwiboo.se>
Cc: Jernej Skrabec <jernej.skrabec@siol.net>
Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210327115742.18986-2-paul@crapouillou.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-14 09:50:01 +02:00
..
adv7511 Linux 5.8 2020-08-11 11:58:31 +10:00
analogix drm: Remove unnecessary drm_panel_attach and drm_panel_detach 2020-08-08 09:06:33 +02:00
cadence drm: bridge: cdns: Kconfig: Switch over dependency to ARCH_K3 2020-11-08 11:05:35 +01:00
synopsys drm: bridge: dw-hdmi: Avoid resetting force in the detect function 2020-11-12 22:21:00 +01:00
cdns-dsi.c drm: bridge: Pass drm_display_info to drm_bridge_funcs .mode_valid() 2020-06-23 19:53:27 +02:00
chrontel-ch7033.c drm: bridge: Pass drm_display_info to drm_bridge_funcs .mode_valid() 2020-06-23 19:53:27 +02:00
display-connector.c drm/bridge: Add bridge driver for display connectors 2020-02-26 13:31:37 +02:00
Kconfig drm: bridge: fix LONTIUM use of mipi_dsi_() functions 2021-05-14 09:49:56 +02:00
lontium-lt9611.c drm/bridge: Fix the dsi remote end-points 2020-08-29 23:02:34 +02:00
lvds-codec.c drm/bridge: lvds-codec: Add support for regulator 2020-09-22 14:10:01 +03:00
Makefile drm: bridge: Add support for Cadence MHDP8546 DPI/DP bridge 2020-09-18 15:16:01 +03:00
megachips-stdpxxxx-ge-b850v3-fw.c drm/brige/megachips: Add checking if ge_b850v3_lvds_init() is working correctly 2020-08-23 17:08:51 +02:00
nwl-dsi.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
nwl-dsi.h drm/bridge: Add NWL MIPI DSI host controller support 2020-04-09 15:52:47 +02:00
nxp-ptn3460.c drm/bridge: nxp-ptn3460: add drm_panel_bridge support 2020-07-27 19:25:10 +02:00
panel.c drm: bridge/panel: Cleanup connector on bridge detach 2021-05-14 09:50:01 +02:00
parade-ps8622.c drm/bridge: parade-ps8622: add drm_panel_bridge support 2020-07-27 17:22:14 +02:00
parade-ps8640.c drm/bridge: ps8640: Rework power state handling 2020-09-15 15:12:24 +02:00
sii902x.c drm/bridge: sii902x: Enable I/O and core VCC supplies if present 2021-01-19 18:27:19 +01:00
sii9234.c drm: bridge: Pass drm_display_info to drm_bridge_funcs .mode_valid() 2020-06-23 19:53:27 +02:00
sil-sii8620.c drm next for 5.9-rc1 2020-08-05 19:50:06 -07:00
sil-sii8620.h
simple-bridge.c drm: bridge: simple-bridge: Make connector creation optional 2020-06-23 19:52:32 +02:00
tc358762.c drm/bridge: tc358762: Add basic driver for Toshiba TC358762 DSI-to-DPI bridge 2020-08-12 22:06:18 +02:00
tc358764.c drm/bridge: tc358764: add drm_panel_bridge support 2020-07-27 17:21:07 +02:00
tc358767.c drm/bridge: tc358767: add drm_panel_bridge support 2020-07-27 19:23:52 +02:00
tc358768.c drm/bridge: Replace HTTP links with HTTPS ones 2020-07-10 20:21:45 +02:00
tc358775.c drm/bridge/tc358775: Remove unneeded semicolon 2020-09-10 08:46:24 +02:00
thc63lvd1024.c drm: bridge: Pass drm_display_info to drm_bridge_funcs .mode_valid() 2020-06-23 19:53:27 +02:00
ti-sn65dsi86.c Linux 5.9-rc4 2020-09-08 14:41:40 +10:00
ti-tfp410.c drm: bridge: Pass drm_display_info to drm_bridge_funcs .mode_valid() 2020-06-23 19:53:27 +02:00
ti-tpd12s015.c drm/bridge: tpd12s015: Fix irq registering in tpd12s015_probe 2020-12-30 11:53:02 +01:00