Re: [PATCH][next] drm/kmb: Fix dereference of pointer plane before a null check
From: Daniel Stone
Date: Wed Jul 30 2025 - 09:55:01 EST
Hi,
On Wed, 30 Jul 2025 at 14:35, Colin Ian King <colin.i.king@xxxxxxxxx> wrote:
> Currently pointer plane is being dereferenced on the calls to
> drm_atomic_get_old_plane_state and drm_atomic_get_new_plane_state
> when assigning old_plane_state and new_plane_state, this could
> lead to a null pointer dereference. Fix this by first performing
> a null pointer check on plane, then assigning old_plane_state and
> new_plance_state and then null pointer checking these.
plane cannot be NULL, so that check should just be deleted instead.
Cheers,
Daniel