Re: [PATCH v2] drm/msm/dpu: check dpu_plane_atomic_print_state() for valid sspp
From: Dmitry Baryshkov
Date: Wed Dec 11 2024 - 16:09:43 EST
On Wed, Dec 11, 2024 at 11:50:26AM -0800, Abhinav Kumar wrote:
> Similar to the r_pipe sspp protect, add a check to protect
> the pipe state prints to avoid NULL ptr dereference for cases when
> the state is dumped without a corresponding atomic_check() where the
> pipe->sspp is assigned.
>
> Fixes: 31f7148fd370 ("drm/msm/dpu: move pstate->pipe initialization to dpu_plane_atomic_check")
> Reported-by: Stephen Boyd <swboyd@xxxxxxxxxxxx>
> Closes: https://gitlab.freedesktop.org/drm/msm/-/issues/67
> Signed-off-by: Abhinav Kumar <quic_abhinavk@xxxxxxxxxxx>
> ---
> To: Rob Clark <robdclark@xxxxxxxxx>
> To: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxx>
> To: Sean Paul <sean@xxxxxxxxxx>
> To: Marijn Suijten <marijn.suijten@xxxxxxxxxxxxxx>
> To: David Airlie <airlied@xxxxxxxxx>
> To: Simona Vetter <simona@xxxxxxxx>
> Cc: linux-arm-msm@xxxxxxxxxxxxxxx
> Cc: dri-devel@xxxxxxxxxxxxxxxxxxxxx
> Cc: freedreno@xxxxxxxxxxxxxxxxxxxxx
> Cc: linux-kernel@xxxxxxxxxxxxxxx
> Cc: Stephen Boyd <swboyd@xxxxxxxxxxxx>
> ---
> Changes in v2:
> - move pstate->stage out of the pipe->sspp check
> - add reported-by credits for Stephen
> - Link to v1: https://lore.kernel.org/r/20241209-check-state-before-dump-v1-1-7a9d8bc6048f@xxxxxxxxxxx
> ---
> drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 15 +++++++++------
> 1 file changed, 9 insertions(+), 6 deletions(-)
>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxx>
--
With best wishes
Dmitry