Re: [PATCH v2 4/4] drm/connector: warn when cleaning up a refcounted connector

2024-11-07 Thread Dmitry Baryshkov
On Wed, Nov 06, 2024 at 11:48:27AM +0100, Luca Ceresoli wrote: > Calling drm_connector_cleanup() should only be done via the free_cb => > .destroy path, which cleans up the struct drm_connector only when the > refcount drops to zero. > > A cleanup done with a refcount higher than 0 can result from

[PATCH v2 4/4] drm/connector: warn when cleaning up a refcounted connector

2024-11-06 Thread Luca Ceresoli
Calling drm_connector_cleanup() should only be done via the free_cb => .destroy path, which cleans up the struct drm_connector only when the refcount drops to zero. A cleanup done with a refcount higher than 0 can result from buggy code, e.g. by doing cleanup directly in the drivers teardown code.