Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues: - [High] Missing cancellation of scheduled work (`conn->hpd_work`) in the driver's remove path. -- --- Patch [1]: [PATCH] drm/bridge: display-connector: fix i2c adapter leak on probe failure --- commit 4febab97b0e18e24c294244f2f96e39bc66cf4b3 Author: Johan Hovold <[email protected]> drm/bridge: display-connector: fix i2c adapter leak on probe failure This commit ensures the i2c adapter device and module references are dropped on failed regulator and enable gpio lookup during probe by adding a devres action. > diff --git a/drivers/gpu/drm/bridge/display-connector.c > b/drivers/gpu/drm/bridge/display-connector.c > index d1e74dd2e0518..8415992fcb106 100644 > --- a/drivers/gpu/drm/bridge/display-connector.c > +++ b/drivers/gpu/drm/bridge/display-connector.c [ ... ] > @@ -439,9 +452,6 @@ static void display_connector_remove(struct > platform_device *pdev) > regulator_disable(conn->supply); > > drm_bridge_remove(&conn->bridge); [Severity: High] This isn't a bug introduced by this patch, but does display_connector_remove() need to cancel conn->hpd_work before returning? If the display-connector module is unbound concurrently with the DRM master calling display_connector_hpd_enable(), the hpd_work work item is scheduled. Without an explicit cancel_work_sync(&conn->hpd_work) here in the remove path, could the work item execute after the devres subsystem has freed the conn structure? This would result in a use-after-free when the work item accesses the freed memory and calls drm_bridge_hpd_notify() on a removed bridge. > - > - if (!IS_ERR(conn->bridge.ddc)) > - i2c_put_adapter(conn->bridge.ddc); > } -- Sashiko AI review ยท https://sashiko.dev/#/patchset/[email protected]?part=1
