Skip to content

soc: qcom: pmic_glink_altmode: fix drm bridge use-after-free

Johan Hovold dri-devel kernel-janitors linux-arm-msm linux-phy lkml stable 1 version Applied

Status from this message: Thanks, Applied to https://anongit.freedesktop.org/git/drm/drm-misc.git (drm-misc-fixes)

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 44 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/6drm/bridge: aux-hpd: fix OF node leaksdrivers/gpu/drm/bridge/aux-hpd-bridge.c+3 -010 replies
2/6drm/bridge: aux-hpd: separate allocation and registrationdrivers/gpu/drm/bridge/aux-hpd-bridge.c include/drm/bridge/aux-bridge.h+67 -154 replies
3/6soc: qcom: pmic_glink_altmode: fix drm bridge use-after-freedrivers/soc/qcom/pmic_glink_altmode.c+13 -36 replies
4/6soc: qcom: pmic_glink: Fix boot when QRTR=mdrivers/soc/qcom/pmic_glink.c+11 -103 replies
5/6phy: qcom-qmp-combo: fix drm bridge registrationdrivers/phy/qualcomm/phy-qcom-qmp-combo.c+4 -44 replies
6/6phy: qcom-qmp-combo: fix type-c switch registrationdrivers/phy/qualcomm/phy-qcom-qmp-combo.c+4 -43 replies

Reviews trailers per patch

All 6 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchNeil ArmstrongBjorn AnderssonDmitry BaryshkovVinod Koul
SeriesA-b
1/6R-b R-b R-b R-b
2/6R-b R-b
3/6R-b R-b
4/6R-b R-b R-b
5/6R-b R-b R-b A-b
6/6R-b R-b A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.

Read the v1 thread

Cover letter [PATCH 0/6] soc: qcom: pmic_glink_altmode: fix drm bridge use-after-free

Starting with 6.8-rc1 the internal display sometimes fails to come up on machines like the Lenovo ThinkPad X13s and the logs indicate that this is due to a regression in the DRM subsystem [1].

This series fixes a race in the pmic_glink_altmode driver which was exposed / triggered by the transparent DRM bridges rework that went into 6.8-rc1 and that manifested itself as a bridge failing to attach and sometimes triggering a NULL-pointer dereference.

The intermittent hard resets that have also been reported since 6.8-rc1 unfortunately still remains and suggests that we are dealing with two separate regressions. There is some indication that also the hard resets (e.g. due to register accesses to unclocked hardware) are also due to changes in the DRM subsystem as it happens around the time that the eDP panel and display controller would be initialised during boot (the runtime PM rework?). This remains to be verified, however.

Included is also a fix for a related OF node reference leak in the aux-hpd driver found through inspection when reworking the driver.

The use-after-free bug is triggered by a probe deferral and highlighted some further bugs in the involved drivers, which were registering child devices before deferring probe. This behaviour is not correct and can both trigger probe deferral loops and potentially also further issues with the DRM bridge implementation.

This series can either go through the Qualcomm SoC tree (pmic_glink) or the DRM tree. The PHY patches do not depend on the rest of the series and could possibly be merged separately through the PHY tree.

Whichever gets this to mainline the fastest.

Johan

[1] https://lore.kernel.org/lkml/[email protected]/

Johan Hovold (5):
drm/bridge: aux-hpd: fix OF node leaks
drm/bridge: aux-hpd: separate allocation and registration
soc: qcom: pmic_glink_altmode: fix drm bridge use-after-free
phy: qcom-qmp-combo: fix drm bridge registration
phy: qcom-qmp-combo: fix type-c switch registration

Rob Clark (1):
soc: qcom: pmic_glink: Fix boot when QRTR=m

 drivers/gpu/drm/bridge/aux-hpd-bridge.c   | 70 ++++++++++++++++++-----
 drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 16 +++---
 drivers/soc/qcom/pmic_glink.c             | 21 +++----
 drivers/soc/qcom/pmic_glink_altmode.c     | 16 +++++-
 include/drm/bridge/aux-bridge.h           | 15 +++++
 5 files changed, 102 insertions(+), 36 deletions(-)
Signature · 1 line
2.43.0