Re: [PATCH v2] drm/nouveau: fix null pointer dereference in nouveau_connector_get_modes

2024-06-28 Thread Lyude Paul
Reviewed-by: Lyude Paul Will push this upstream in just a moment, thanks! On Thu, 2024-06-27 at 10:27 +0800, Ma Ke wrote: > In nouveau_connector_get_modes(), the return value of > drm_mode_duplicate() > is assigned to mode, which will lead to a possible NULL pointer > dereference on failure of d

[PATCH v2] drm/nouveau: fix null pointer dereference in nouveau_connector_get_modes

2024-06-26 Thread Ma Ke
In nouveau_connector_get_modes(), the return value of drm_mode_duplicate() is assigned to mode, which will lead to a possible NULL pointer dereference on failure of drm_mode_duplicate(). Add a check to avoid npd. Fixes: 6ee738610f41 ("drm/nouveau: Add DRM driver for NVIDIA GPUs") Signed-off-by: Ma