Re: [PATCH] drm: rcar-du: Fix crash when no CMM is available

Tomi Valkeinen
2026-04-10T05:20:23Z

Hi,

On 08/04/2026 15:42, Laurent Pinchart wrote:
> Commit 3bce3fdd1ff2 ("drm: rcar-du: Don't leak device_link to CMM")
> refactored CMM handling, and introduced an incorrect test for CMM
> availability. When no CMM is present, the rcrtc->cmm field is NULL,
> testing rcrtc->cmm->dev causes a NULL pointer dereference. This slipped
> through testing as all tests were run with the CMM present.
>
> Fix this issue by correctly testing for rcrtc->cmm.
>
> Fixes: 3bce3fdd1ff2 ("drm: rcar-du: Don't leak device_link to CMM")
> Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
> Closes: https://lore.kernel.org/dri-devel/CAMuHMdXomz9GFDqkBjGX9Sda_GLccPcrihvFbOz0GAitDVNTbw@mail.gmail.com
> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
> drivers/gpu/drm/renesas/rcar-du/rcar_du_crtc.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
Thanks, pushed to drm-misc-next.

Tomi