Hi,

On Thu, May 07, 2026 at 01:52:58PM +0200, Albert Esteve wrote:
> This series converts 9 remaining panel drivers from the deprecated
> devm_kzalloc() + drm_panel_init() pattern to the refcounted
> devm_drm_panel_alloc() API. This follows the work by Anusha Srivatsa
> who introduced the refcounted panel allocation infrastructure [1] and
> converted a first batch of drivers [2] (the last part of a 5 sub-series).
> 
> Reasoning:
> ----------
> The old allocation pattern is unsafe: when the panel device is
> unbound, devm frees the context struct immediately, but the DRM
> device may still hold a reference to the embedded drm_panel through
> the panel bridge, leading to a use-after-free. devm_drm_panel_alloc()
> wraps the allocation in a kref scheme, so the memory is only freed
> when the last reference is dropped.
> 
> After this series, there are no remaining callers of drm_panel_init()
> under drivers/gpu/drm/panel/, and drm_panel_init() is entirely removed
> from the public API.
> 
> [1] 
> https://lore.kernel.org/all/[email protected]/
> [2] 
> https://lore.kernel.org/all/20250710-b4-driver-convert-last-part-july-v1-0-de73ba81b...@redhat.com/
> 
> Signed-off-by: Albert Esteve <[email protected]>

Aside from the minor comment on the doc in patch 10,
Reviewed-by: Maxime Ripard <[email protected]>

Thanks!
Maxime

Attachment: signature.asc
Description: PGP signature

Reply via email to