linux-stable/drivers/gpu/drm/msm/dp
Bjorn Andersson fa0048a4b1 drm/msm/dp: Free resources after unregistering them
The DP component's unbind operation walks through the submodules to
unregister and clean things up. But if the unbind happens because the DP
controller itself is being removed, all the memory for those submodules
has just been freed.

Change the order of these operations to avoid the many use-after-free
that otherwise happens in this code path.

Fixes: c943b4948b ("drm/msm/dp: add displayPort driver support")
Signed-off-by: Bjorn Andersson <quic_bjorande@quicinc.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Patchwork: https://patchwork.freedesktop.org/patch/542166/
Link: https://lore.kernel.org/r/20230612220259.1884381-1-quic_bjorande@quicinc.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
2023-06-15 13:20:31 +03:00
..
dp_audio.c drm/msm/dp: unregister audio driver during unbind 2023-04-26 16:45:35 -07:00
dp_audio.h drm/msm/dp: unregister audio driver during unbind 2023-04-26 16:45:35 -07:00
dp_aux.c drm/msm/dp: Return IRQ_NONE for unhandled interrupts 2023-04-06 20:29:44 +03:00
dp_aux.h drm/msm/dp: Return IRQ_NONE for unhandled interrupts 2023-04-06 20:29:44 +03:00
dp_catalog.c drm/msm/dp: enable HDP plugin/unplugged interrupts at hpd_enable/disable 2023-06-08 18:10:44 -07:00
dp_catalog.h drm/msm/dp: enable HDP plugin/unplugged interrupts at hpd_enable/disable 2023-06-08 18:10:44 -07:00
dp_ctrl.c drm/msm/dp: Return IRQ_NONE for unhandled interrupts 2023-04-06 20:29:44 +03:00
dp_ctrl.h drm/msm/dp: remove most of usbpd-related remains 2023-06-04 05:44:53 +03:00
dp_debug.c drm/msm/dp: remove most of usbpd-related remains 2023-06-04 05:44:53 +03:00
dp_debug.h drm/msm/dp: remove most of usbpd-related remains 2023-06-04 05:44:53 +03:00
dp_display.c drm/msm/dp: Free resources after unregistering them 2023-06-15 13:20:31 +03:00
dp_display.h drm/msm/dp: Add basic PSR support for eDP 2023-03-13 04:43:49 +03:00
dp_drm.c drm/msm/dp: set self refresh aware based on PSR support 2023-03-13 04:43:50 +03:00
dp_drm.h drm/msm/dp: use atomic callbacks for DP bridge ops 2023-03-13 04:43:49 +03:00
dp_link.c drm/msm/dp: Fix spelling mistake "Capabiity" -> "Capability" 2023-04-06 20:29:44 +03:00
dp_link.h drm/msm/dp: DisplayPort PHY compliance tests fixup 2020-11-04 08:26:25 -08:00
dp_panel.c drm/msm/dp: Add basic PSR support for eDP 2023-03-13 04:43:49 +03:00
dp_panel.h drm/msm/dp: remove most of usbpd-related remains 2023-06-04 05:44:53 +03:00
dp_parser.c drm/msm/dp: Add capability to parser and retrieve max DP link supported rate from link-frequencies property of dp_out endpoint 2023-01-09 03:06:44 +02:00
dp_parser.h drm/msm/dp: Add capability to parser and retrieve max DP link supported rate from link-frequencies property of dp_out endpoint 2023-01-09 03:06:44 +02:00
dp_power.c drm/msm/dp: Clean up pdev/dev duplication in dp_power 2023-06-04 05:44:53 +03:00
dp_power.h drm/msm/dp: remove most of usbpd-related remains 2023-06-04 05:44:53 +03:00
dp_reg.h drm/msm/dp: Add basic PSR support for eDP 2023-03-13 04:43:49 +03:00