diff options
author | Samuel Holland <samuel@sholland.org> | 2022-06-15 08:42:53 +0300 |
---|---|---|
committer | Maxime Ripard <maxime@cerno.tech> | 2022-06-16 10:49:28 +0300 |
commit | 1342b5b23da9559a1578978eaff7f797d8a87d91 (patch) | |
tree | 9becfd6ea20f39616eff19281fd735a9c4c93dc7 /drivers/ptp | |
parent | 920169041baa0a7497ed702aa97d6a2d6285efd3 (diff) | |
download | linux-1342b5b23da9559a1578978eaff7f797d8a87d91.tar.xz |
drm/sun4i: Fix crash during suspend after component bind failure
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@sholland.org>
Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://lore.kernel.org/r/20220615054254.16352-1-samuel@sholland.org
Diffstat (limited to 'drivers/ptp')
0 files changed, 0 insertions, 0 deletions