On Fri, May 08, 2026 at 09:04:40AM +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]> > --- > Changes in v2: > - Remove drm_panel_init/alloc precedence mentions in kdocs > - Link to v1: > https://lore.kernel.org/r/[email protected] >
For the series: Reviewed-by: Dmitry Baryshkov <[email protected]> -- With best wishes Dmitry
