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,
> -
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
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
> 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?
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
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