linux/drivers/gpu/drm/bridge
Douglas Anderson 02d43b8a4f drm/bridge: ti-sn65dsi86: Fix auxiliary bus lifetime
[ Upstream commit 7aa83fbd71 ]

Memory for the "struct device" for any given device isn't supposed to
be released until the device's release() is called. This is important
because someone might be holding a kobject reference to the "struct
device" and might try to access one of its members even after any
other cleanup/uninitialization has happened.

Code analysis of ti-sn65dsi86 shows that this isn't quite right. When
the code was written, it was believed that we could rely on the fact
that the child devices would all be freed before the parent devices
and thus we didn't need to worry about a release() function. While I
still believe that the parent's "struct device" is guaranteed to
outlive the child's "struct device" (because the child holds a kobject
reference to the parent), the parent's "devm" allocated memory is a
different story. That appears to be freed much earlier.

Let's make this better for ti-sn65dsi86 by allocating each auxiliary
with kzalloc and then free that memory in the release().

Fixes: bf73537f41 ("drm/bridge: ti-sn65dsi86: Break GPIO and MIPI-to-eDP bridge into sub-drivers")
Suggested-by: Stephen Boyd <swboyd@chromium.org>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230613065812.v2.1.I24b838a5b4151fb32bccd6f36397998ea2df9fbb@changeid
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-07-23 13:49:19 +02:00
..
adv7511 drm/bridge: adv7533: Fix adv7533_mode_valid for adv7533 and adv7535 2023-05-11 23:03:10 +09:00
analogix drm/bridge: anx7625: Prevent endless probe loop 2023-07-19 16:21:21 +02:00
cadence
imx
synopsys
cdns-dsi.c
chipone-icn6211.c
chrontel-ch7033.c
cros-ec-anx7688.c
display-connector.c
fsl-ldb.c
ite-it6505.c drm/bridge: it6505: Move a variable assignment behind a null pointer check in receive_timing_debugfs_show() 2023-07-19 16:21:14 +02:00
ite-it66121.c
Kconfig
lontium-lt8912b.c drm/bridge: lt8912b: Fix DSI Video Mode 2023-05-17 11:53:47 +02:00
lontium-lt9211.c
lontium-lt9611.c drm/bridge: lt9611: Fix PLL being unable to lock 2023-04-13 16:55:37 +02:00
lontium-lt9611uxc.c
lvds-codec.c
Makefile
megachips-stdpxxxx-ge-b850v3-fw.c
nwl-dsi.c
nwl-dsi.h
nxp-ptn3460.c
panel.c
parade-ps8622.c
parade-ps8640.c
sii902x.c
sii9234.c
sil-sii8620.c
sil-sii8620.h
simple-bridge.c
tc358762.c
tc358764.c
tc358767.c drm/bridge: tc358767: Switch to devm MIPI-DSI helpers 2023-07-19 16:21:19 +02:00
tc358768.c drm/bridge: tc358768: fix THS_TRAILCNT computation 2023-07-19 16:21:16 +02:00
tc358775.c
thc63lvd1024.c
ti-dlpc3433.c
ti-sn65dsi83.c drm/bridge: ti-sn65dsi83: Fix enable/disable flow to meet spec 2023-07-19 16:21:23 +02:00
ti-sn65dsi86.c drm/bridge: ti-sn65dsi86: Fix auxiliary bus lifetime 2023-07-23 13:49:19 +02:00
ti-tfp410.c
ti-tpd12s015.c