[PATCH] drm/sun4i: Fix crash during suspend after component bind failure
Maxime Ripard
maxime at cerno.tech
Thu Jun 16 00:51:01 PDT 2022
Hi,
On Wed, Jun 15, 2022 at 12:42:53AM -0500, Samuel Holland wrote:
> If the component driver fails to bind, or is unbound, the driver data
> for the top-level platform device points to a freed drm_device. If the
> system is then suspended, the driver passes this dangling pointer to
> drm_mode_config_helper_suspend(), which crashes.
>
> Fix this by only setting the driver data while the platform driver holds
> a reference to the drm_device.
>
> Fixes: 624b4b48d9d8 ("drm: sun4i: Add support for suspending the display driver")
> Signed-off-by: Samuel Holland <samuel at sholland.org>
Yeah, it's far from the only issue regarding structure lifetimes in the
driver.
We should convert as much as possible to the DRM-managed functions to
fix those.
Maxime
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20220616/4fbd81cd/attachment-0001.sig>
More information about the linux-arm-kernel
mailing list