WSL2-Linux-Kernel/drivers/gpu
Ma Ke c763dfe094 drm/client: fix null pointer dereference in drm_client_modeset_probe
commit 113fd6372a5bb3689aba8ef5b8a265ed1529a78f upstream.

In drm_client_modeset_probe(), the return value of drm_mode_duplicate() is
assigned to modeset->mode, which will lead to a possible NULL pointer
dereference on failure of drm_mode_duplicate(). Add a check to avoid npd.

Cc: stable@vger.kernel.org
Fixes: cf13909aee ("drm/fb-helper: Move out modeset config code")
Signed-off-by: Ma Ke <make24@iscas.ac.cn>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20240802044736.1570345-1-make24@iscas.ac.cn
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-08-19 05:45:43 +02:00
..
drm drm/client: fix null pointer dereference in drm_client_modeset_probe 2024-08-19 05:45:43 +02:00
host1x gpu: host1x: Do not setup DMA for virtual devices 2024-05-17 11:50:54 +02:00
ipu-v3 gpu: ipu-v3: common: Add of_node_put() for reference returned by of_graph_get_port_by_id() 2023-03-10 09:39:20 +01:00
trace
vga vgaarb: don't pass a cookie to vga_client_register 2021-07-21 10:29:10 +02:00
Makefile