Re: [PATCH] drm/nouveau: Fix null pointer dereference

2025-04-15 Thread Lyude Paul
On Sat, 2025-04-12 at 12:53 -0500, Chenyuan Yang wrote: > @@ -236,9 +237,11 @@ static int ch7006_encoder_get_modes(struct drm_encoder > *encoder, > ~mode->valid_norms & 1 continue; > > - drm_mode_probed_add(connector, > -

[PATCH] drm/nouveau: Fix null pointer dereference

2025-04-12 Thread Chenyuan Yang
The return value of drm_mode_duplicate() is assigned to mode, which will lead to a NULL pointer dereference on failure of drm_mode_duplicate(). Add a check to avoid npd. Signed-off-by: Chenyuan Yang Fixes: 6ee738610f41 ("drm/nouveau: Add DRM driver for NVIDIA GPUs") --- drivers/gpu/drm/nouveau/d

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

2024-06-26 Thread Danilo Krummrich
On 6/26/24 11:44, Jani Nikula wrote: On Wed, 26 Jun 2024, 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 drm_mode_duplicate(). Add a check to avoid npd. Please a

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

2024-06-26 Thread Markus Elfring
> 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. 1. Can a wording approach (like the following) be a better change description?

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

2024-06-26 Thread Jani Nikula
On Wed, 26 Jun 2024, 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 drm_mode_duplicate(). Add a check to avoid npd. > > Signed-off-by: Ma Ke > --- > drivers/gp

[PATCH] 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. Signed-off-by: Ma Ke --- drivers/gpu/drm/nouveau/nouveau_connector.c | 2 ++ 1 file