Re: [PATCH] drm/via: Add new condition to via_dma_cleanup()

From: Sam Ravnborg
Date: Tue Jul 26 2022 - 13:23:38 EST


Hi Alisa,

On Mon, Jul 25, 2022 at 01:45:55PM +0300, Alisa Khabibrakhmanova wrote:
> Pointer dev_priv->mmio, which was checked for NULL at via_do_init_map(),
> is passed to via_do_cleanup_map() and is dereferenced there without check.
>
> The patch adds the condition in via_dma_cleanup() which prevents potential NULL
> pointer dereference.
>
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
>
> Fixes: 22f579c621e2 ("drm: Add via unichrome support")
> Signed-off-by: Alisa Khabibrakhmanova <khabibrakhmanova@xxxxxxxxx>

Thanks for your patch. Due to other changes in drm-misc where we
maintain the via driver this patch fails to apply.
It would be great if you could redo the patch after -rc2 - on top of
-next. Then we can apply it to drm-misc.

You will see that the individual files for the driver is merged to a
single file, and this change does not hit -next until later.

Sam