Re: [PATCH] drm/amdgpu/vkms: fix a possible null pointer dereference

2023-10-13 Thread Alex Deucher
On Thu, Oct 12, 2023 at 10:32 PM Ma Ke wrote: > > In amdgpu_vkms_conn_get_modes(), the return value of drm_cvt_mode() > is assigned to mode, which will lead to a NULL pointer dereference > on failure of drm_cvt_mode(). Add a check to avoid null pointer > dereference. > > Signed-off-by: Ma Ke

[PATCH] drm/amdgpu/vkms: fix a possible null pointer dereference

2023-10-12 Thread Ma Ke
In amdgpu_vkms_conn_get_modes(), the return value of drm_cvt_mode() is assigned to mode, which will lead to a NULL pointer dereference on failure of drm_cvt_mode(). Add a check to avoid null pointer dereference. Signed-off-by: Ma Ke --- drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c | 2 ++ 1 file